-
Notifications
You must be signed in to change notification settings - Fork 40
Home
This is the Wiki home for Ning-compress project.
Ning-compress is a Java library for encoding and decoding data in LZF format, written by Tatu Saloranta ([email protected])
Data format and algorithm based on original LZF library by Marc A Lehmann
Format differs slightly from some other adaptations, such as one used by H2 database project (by Thomas Mueller); although internal block compression structure is the same, block identifiers differ. This package uses the original LZF identifiers to be 100% compatible with existing command-line lzf tool(s).
LZF alfgorithm itself is optimized for speed, with somewhat more modest compression: compared to Deflate (algorithm gzip uses) LZF can be 5-6 times as fast to compress, and twice as fast to decompress.
Javadocs:
Typical usage is by using one of programmatic interfaces
- block-based interface (LZFEncoder, LZFDecoder)
- streaming interface (LZFInputStream, LZFOutputStream)
but it is also possibly to use jar as a command-line tool since it has manifest that points to 'com.ning.compress.lzf.LZF' as the class having main() method to call.
This means that you can use it like:
java -jar compress-lzf-0.9.2.jar
(which will display necessary usage arguments)
Finally, jar is also a valid (and extremely simple) OSGi bundle to make it work nicely on OSGi containers.
Check out jvm-compress-benchmark for comparison of space- and time-efficiency of this LZF implementation, relative other available Java-accessible compression libraries.