Java LZO compression library

人盡茶涼 提交于 2019-12-07 19:44:37

问题


I'm trying to use LZO compression library inside my Java program (http://www.oberhumer.com/opensource/lzo/). I could not find a single example how to use it for compression and decompression of data. Can anybody help me with it? Apparently the native code is not in Java, so I'm not also sure what steps to take to use it (JNI or something?!)


回答1:


The original code from Oberhumer does not contain a java compressor. You might want to have a look at https://github.com/shevek/lzo-java.

Does it have to be LZO or would another compression algorithm also work? There is a nice benchmarking suite of compression algorithms in Java available on GitHub: https://github.com/ning/jvm-compressor-benchmark. Looking at the results there, it seems there are other algorithms providing more or less the same compression rate but are much faster.

I personally use iq80's snappy implementation (https://github.com/dain/snappy) regularly in apps where I need in-memory compression. It is pure java, so it runs everywhere, but still very fast.




回答2:


you can use LZO jar file and can be downloaded from given link http://www.java2s.com/Code/Jar/h/Downloadhadooplzo0414jar.htm

It will help you



来源:https://stackoverflow.com/questions/26804588/java-lzo-compression-library

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