MIT License

项目介绍

Sygmei/11Zip 是一个托管在 GitHub 上的开源项目,主要使用 C++ 编写,采用 MIT License 许可证,目前获得 98 个 Star、22 次 Fork。

仓库全名
Sygmei/11Zip
开源许可证
MIT License
Star 数
98
Fork 数
22
未关闭 Issue
6

README 摘要

11Zip 11Zip (or EL even Zip) is a dead simple zipping / unzipping C++ Lib I didn't really wanted to make my own zipping / unzipping library but as I found nothing else, I made my own. That's why I called this lib 11Zip, 11 is the atomic number of the sodium as it describes pretty well my salty feeling when searching for a zipping / unzipping C++ Lib. By the same time it's also a reference to 7zip. The lib is based…

完整内容见 GitHub 原始 README 或本页 。

常见问题

11Zip 用什么语言开发?

主要使用 C++ 编写,采用 MIT License 许可证,目前有 98 个 Star。

11Zip 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 11Zip 的源码?

可以直接克隆仓库:git clone https://github.com/Sygmei/11Zip.git;安装与运行步骤见仓库 README。

11Zip 最近还在维护吗?

仓库最近一次更新为 2023年5月10日,当前有 6 个未关闭 Issue;Star 数为 98,可作为社区活跃度的参考。

关于

Dead simple zipping / unzipping C++ Lib

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
240
价值分
74
活跃状态
活跃

README

11Zip

build

11Zip (or ELevenZip) is a dead simple zipping / unzipping C++ Lib

I didn’t really wanted to make my own zipping / unzipping library but as I found nothing else, I made my own.

That’s why I called this lib 11Zip, 11 is the atomic number of the sodium as it describes pretty well my salty feeling when searching for a zipping / unzipping C++ Lib.

By the same time it’s also a reference to 7zip.

The lib is based on zlib & minizip : https://github.com/madler/zlib

It does also include some wrapper code from here : www.vilipetek.com/2013/11/22/zippingunzipping-files-in-c/

Installation

Clone this repository using the following command :

git clone --recurse-submodules https://github.com/Sygmei/11Zip.git

(don’t forget about the --recurse-submodules part or dependencies are not going to be downloaded).

Once downloaded, put the content into your extlibs/ (or equivalent) directory and put the following lines in your CMakeLists.txt :

add_subdirectory(extlibs/elzip) # Path to the 11zip

target_link_libraries(YourTargetName elzip)

Reference

elz::extractZip

void elz::extractZip(std::string zipname, std::string target = ".", std::string password = "");

Unzips the content of a zip in “target” folder (which is current folder by default).

  • zipname : Path to the .zip archive to unzip
  • target : Path to the directory where you want to unzip the archive, defaults to the current working directory
  • password : Archive password (optional)

elz::extractFile

void elz::extractFile(std::string zipname, std::string filename, std::string target = ".", std::string password = "");

Extracts a single file from a zip archive

  • zipname : Path to the .zip archive to unzip the file from
  • filename : Path of the file to extract within the zip archive, note that this name will be used by the unzipped file as well
  • target : Path where to extract the file to, defaults to the current working directory
  • password : Archive password (optional)

elz::zipFolder

void elz::zipFolder(std::string folderName, std::string zipTarget = "");

Zips the folder “folderName” to “zipTarget” (Which is “folderName”.zip by default).

  • folderName : Name of the folder to zip (will zip all of its content, root folder excluded)
  • zipTarget : Path to .zip archive that will be created, defaults to folderName.zip

评论

暂无评论