Compression Libraries For C++ [closed]

一世执手 提交于 2019-11-30 09:17:22

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.

You could do this easily using Boost iostream zlib filter

Zlib is good, but you might want to check the LZMA SDK as well (you could compress to .7z format, in addition to zip)

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.

Use libzip: http://www.nih.at/libzip/ The license is pretty permissive and it does all you need, from C or C++ code.

user172818

zlib is strongly recommended. It is well written and the interface is fairly clean. I do not see how much a C++ wrapper can simplify APIs. Furthermore, in my view, zlib achieves a good balance between (de)compression speed and file size. Bzip2 is much slower while the compression ratio of LZO and UCL is worse.

This what I like (really fast and good compression rate): http://www.quicklz.com/

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!