Question

I need to create archive files out of a stream of data. The program should be written in C++ and should be run as a 64 bit program on Windows OS. I am looking into Zlib and 7-Zip libraries but have no experience working with them. Any suggestions about which one to pick?

Regards, Lalith

Was it helpful?

Solution

It really depends on what you intend to be compressing, and any related requirements you may have. Generally, the main trade-off is compression speed vs effectiveness (output file size).

It isn't exactly clear from your question, but if you're compressing images, video, audio -- you should be looking at other options (codecs).

Here's a comparison of the libraries you've mentioned. Granted, the author didn't pay much attention to changing the default compression levels, but it should give you an idea of what's out there.

So far, I've only used zlib, and found it to be fairly straightforward. We were using it for a commercial product and found its stance on licensing and patents quite positive. It's got quite a good reputation.

7-zip seems like it was designed for Windows. If you're not thinking of ever porting your program to run on different systems, then this won't be a limitation to you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top