Compression Libraries For C++
Most compression libraries that I know of are written in C for two reasons: one, the general age of good compression algorithms; and two, the high portability (and stability) of C across platforms.
I suggest any of the following. If you want good licenses select one of the top two, otherwise if you're open to using GPL code pick one of the last two.
- Bzip2
- Zlib
- LZO
- UCL
Use libzip: http://www.nih.at/libzip/ The license is pretty permissive and it does all you need, from C or C++ code.
You could do this easily using Boost iostream zlib filter
I would suggest using zlib. It is designed for C, but it works fine in C++.
Using native C++ libraries really only helps when the library is sufficiently big and complex that it can benefit from object oriented design. zlib is relatively simple, and doesn't need object oriented features.