tags:

views:

246

answers:

5

Does anyone know zip library of C/C++ in public domain license?

It meets the following requirements.

  1. It operates by the unit like stb_image.c library
  2. Supported cross platform. Windows, Mac, Linux and so on.
  3. Language is C/C++
  4. License is public domain.
+1  A: 

http://www.bzip.org/ is pretty common and a requirement of tons of easy_installs in multiple target languages.

eruciform
bzip uses Burrows-Wheeler compression algorithm, whereas zip uses Deflate algorithm.
el.pescado
@el.pescado: was this a requirement that I missed?
eruciform
Despite name similarities, bzip2 != zip
el.pescado
+7  A: 

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.

el.pescado
It is not Public Domain, but I try using it. Thanks!
Shiva
+2  A: 

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.

greyfade
Thanks! It serves as a reference!
Shiva
+2  A: 

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.

DrTwox
Oh, It serves as a reference. Thanks!
Shiva
A: 

Public Domain is the LZMA sdk from 7z http://www.7-zip.org/sdk.html

Problem: the documentation is "not existing" :-(