Ruby的压缩库? [英] Compression libraries for Ruby?
问题描述
有没有任何开放源代码压缩/解压缩库可用于Ruby?有没有人实现了LZW?
Are there any open-source compression/decomp libraries available for Ruby? Has anyone implemented LZW?
还是,有没有使用压缩组件的开放源代码库,可以被提取为独立使用?
Or, are there any open-source libraries that use a compression component which could conceivably be extracted for independent use?
编辑 - 感谢答案!我应该提到,我必须压缩是长字符串,只会驻留在数据库(我不会压缩文件)。此外,如果任何库可以做到这一点是理想的在客户端comp / decomp的JavaScript中的等价实现,因为这将是一个web应用程序。
EDIT -- thanks for the answers! I should have mentioned that what I have to compress are long strings that will only reside in a database (I won't be compressing files). Also, it would be ideal if whatever library could do this had an equivalent implementation in JavaScript for client-side comp/decomp, as this would be for a web app.
推荐答案
您可以在 ruby下找到所有发布的ruby库的清单stdlib 。
我会使用zlib库,它是开放的,它随处可用,你会发现几乎每种语言的库!
I'd use the zlib library, it's open, it's used everywhere and you'll find libraries for virtually every language!
这篇关于Ruby的压缩库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!