最快的c ++文件压缩库可用? [英] fastest c++ file compression library available?

查看:85
本文介绍了最快的c ++文件压缩库可用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要找到最好的库来压缩内存数据。
我目前使用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/

压缩工具拍摄:
< a href =http://compression.ca/act/act-summary.html> http://compression.ca/act/act-summary.html

编辑:lzo的更多细节(从其网站,感谢Chris纠正链接)

More details about lzo (from its website, thanks Chris for correcting the link)


  • 无需解压缩内存

  • 压缩速度非常快。

  • 需要64 KB的压缩内存。

请注意,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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆