最快的c ++文件压缩库可用? [英] fastest c++ file compression library available?
问题描述
我需要找到最好的库来压缩内存数据。
我目前使用zlib,但我想知道是否有一个更好的压缩库;更好的性能和内存占用。
I have a need to find the best library to compress in memory data. I am currently using zlib but I am wondering if there is a better compression library; better in terms of performance and memory footprint.
它应该能够处理同一存档中的多个文件。
It should be able to handle multiple files in the same archive.
我正在寻找一个C / C ++库。
I am looking for a C/C++ library.
性能是关键因素。正在压缩的文件是小到大的XML文件。
Performance is the key factor. The files that are being compressed are small to large XML files.
推荐答案
大多数lib都有一个C API而不是C ++。你可以看看lzo,这是相当快,但在压缩率方面不是很好。
Most libs have a C API rather than C++. You can look at lzo, which is fairly fast but not as good in terms of compression ratio.
http://www.oberhumer.com/opensource/lzo/
压缩工具:
http://compression.ca/act/act-summary.html
编辑:有关lzo的更多详情(从其网站,感谢Chris纠正链接)
More details about lzo (from its website, thanks Chris for correcting the link)
- 不需要内存解压缩。
- 压缩速度非常快。
- 需要64 kB内存进行压缩。 li>
- Requires no memory for decompression.
- Compression is pretty fast.
- Requires 64 kB of memory for compression.
请注意,lzo适用于内存缓冲区,因此您必须自己处理文件到/从文件的转换。
Note that lzo works on memory buffers, so you'll have to handle the conversion to/from files yourself.
另请注意,lzo是GPL,这可能是一个问题,这取决于您的应用程序。
Also note that lzo is GPL which may be a problem, depending on your application.
这篇关于最快的c ++文件压缩库可用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!