Java LZO compression library

2019-05-26 22:55发布

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?!)

标签: java lzo
2条回答
我只想做你的唯一
2楼-- · 2019-05-26 23:42

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.

查看更多
我想做一个坏孩纸
3楼-- · 2019-05-26 23:48

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

查看更多
登录 后发表回答