Questions asking us to recommend or find a tool, library开发者_开发问答 or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this questionDoes anyone know zip library of C/C++ in public domain license?
It meets the following requirements.
- It operates by the unit like stb_image.c library
- Supported cross platform. Windows, Mac, Linux and so on.
- Language is C/C++
- License is public domain.
I'd recommend ZipLib.
Personal reasons why I love this project:
- built around c++11 stl streams (e.g. decompresses into STL streams!)
- lightweight (no dependencies other than zlib)
- can be used on both windows & linux
It took me a long time to find this project -- hope this helps someone.
It didn't yet exist when the question was asked. But it does now: miniz - public domain, single C file, explicitly inspired by the likes of stb_image.
The most popular open source zip implementation is Info-Zip. Deflate algorithm used in zip file format is implemented by zlib library. Both are released on liberal, BSD-like license, but not public domain.
It's not public domain, but Minizip, which is included with zlib, meets your other three requirements. It also contains miniunz.c, a very easy to follow zip/unzip example.
The closest I can think of would be Xz-utils, which uses the public domain LZMA SDK. It's not zip, per se, nor does it use the deflate algorithm, but it is one of the few compression libraries in the public domain.
Public Domain is the LZMA sdk from 7z http://www.7-zip.org/sdk.html
Problem: the documentation is "not existing" :-(
http://www.bzip.org/ is pretty common and a requirement of tons of easy_installs in multiple target languages.
Update: I realize this is wrong, but it's a common misunderstanding, so I'm leaving it up as a sentinel to describe a frequent error.
精彩评论