My favorites | Sign in
lz4
Project Home Issues Source
Project Information
Members
Links

LZ4 is a very fast lossless compression algorithm, providing compression speed at 300 MB/s per core, scalable with multi-cores CPU. It also features an extremely fast decoder, with speeds up and beyond 1GB/s per core, typically reaching RAM speed limits on multi-core systems.

A high compression derivative, called LZ4_HC, is also provided. It trades CPU for compression ratio.

Quick comparison (single thread, using Silesia Corpus on a Core 2 Duo @3GHz - Get the Open-Source Benchmark program by m^2)

Name		Ratio	C.speed	D.speed
LZ4 (r41)	2.08	319	1070
LZO 2.05 1x_1	2.07	318	 466
QuickLZ 1.5 -1	2.22	274	 295
Snappy 1.0.4	2.02	242	 683
LZF		2.08	204	 482
FastLZ		2.03	196	 424
zlib 1.2.5 -1	2.74	 46	 179
LZ4 HC (r66)    2.72     18     1150
zlib 1.2.5 -6	3.10	 17	 196

You can find benchmarks and a win32 multi-threaded binary for windows at LZ4 homepage

An independant comparison of fast compressors is available here

The LZ4 format is detailed here : http://fastcompression.blogspot.com/2011/05/lz4-explained.html

Browse the latest C source code here


Other versions :

LZ4 is also available in C# source code, thanks to Clayton Stangeland : https://github.com/stangelandcl/LZ4Sharp

A Java JNI wrapper of LZ4 is provided as part of the JNI-compression package by Binglin Chang : https://github.com/decster/jnicompressions

A binding for Python has been created by Steeve Morin : http://pypi.python.org/pypi/lz4 (or https://github.com/steeve/python-lz4)

A Perl interface to LZ4 has been completed by Gray : http://search.cpan.org/dist/Compress-LZ4/

A port of LZ4 using Go Language is provided by Branimir Karadzic : https://github.com/bkaradzic/go-lz4

LZ4 is also usable as a LUA library, within the Bonaluna package maintained by Christophe Delord : http://cdsoft.fr/bl/bonaluna.html


What's new ?

r66 : LZ4 HC (High Compression Mode) : now integrated into main LZ4 source trunk. License is BSD.

r65 : LZ4Demo : new feature : LZ4Demo can handle multiple appended compressed streams (using '>>' redirector)

r64 : minor : force software bit count for Windows CE target using Visual ( issue 17 )

r63 : minor : linking stage of Visual 2005 in Debug Mode ( issue 16 )

r62 : Added : cmake configuration file. Thanks Dmitry Cherepanov


Public discussion

Post bug reports or feature request to the Issue Tracker: http://code.google.com/p/lz4/issues/list

Public discussion forum is here: http://groups.google.com/group/lz4c

Powered by Google Project Hosting