有哪些好的二进制数据压缩 Java 库?
我正在研究压缩二进制数据,更具体地说是序列化的 Java 对象。我想我需要实现此维基百科页面上列出的算法之一。我找到了一些教程和博客文章,但没有找到库(我发现的大多数代码似乎是从其他语言移植的......而且我不相信方法名称以大写字母开头的 Java 库的效率和准确性) 。因此,如果能指出哪种算法最适合压缩序列化 Java 对象(以及任意二进制数据),我们将不胜感激。如果有人知道与该主题相关的活跃项目(Apache 似乎没有任何项目),那就太棒了。
I'm looking into compressing binary data, more specifically serialized Java objects. I think I need an implementation of one of the algorithms that are listed on this Wikipedia page. I found a couple of tutorials and blog posts but no libraries (and most code I found seemed to be ported from other languages... and I don't trust the efficiency and accuracy of a Java library where method names begin with capital letters). So, any pointers on which algorithm is most suitable for compressing serialized Java objects (as well as arbitrary binary data) would be much appreciated. And it would be amazing if someone knows of an active project that relates to this topic (Apache didn't seem to have anything).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
实际上,JBoss 提供了标准 java 序列化机制的良好替代方案 - JBoss Serialization。看看http://jboss.org/serialization
Actually JBoss provides good alternative to standard java serialization mechanism - JBoss Serialization. Have a look at http://jboss.org/serialization
您可以查看 [G]Zip(In|Out)putStream 以了解完全序列化后的压缩方案。它可能会为您提供良好的压缩,而无需更改任何现有的序列化逻辑。您必须对其进行测试以确定它会产生什么变化。
You could take a look at [G]Zip(In|Out)putStream for a fully-after-serialization compression scheme. It might give you good compression without having to change any of your existing serialization logic. You'd have to test it to determine the difference it would make.