问题
I'm working on a commercial project that requires a couple of files to be bundled (packed) into an archive and then compressed. Right now we have zlib in our utility library, but it doesn't look like zlib has the functionality to compress multiple files into one archive. Does anyone know of free libraries I'd be able to use for this?
回答1:
Perhaps libtar? Also under a BSD license.
回答2:
7Zip has a full SDK for several languages including C and C++. The compression is extremely good, albeit not very fast. The code is licensed under the LGPL.
回答3:
You could use libzip - it's under a BSD-like licence so it should be usable in a commercial project.
回答4:
To compress multiple files into one zip archive you could use Zipios++
回答5:
Also have a look at bzip2.
来源:https://stackoverflow.com/questions/1224464/c-c-packing-and-compression