LZ4 - Extremely fast compression (original) (raw)

Benchmarks ---------- The benchmark uses the [Open-Source Benchmark program by m^2 (v0.14.2)](http://encode.ru/threads/1371-Filesystem-benchmark?p=33548&viewfull=1#post33548) compiled with GCC v4.6.1 on Linux Ubuntu 64-bits v11.10, The reference system uses a Core i5-3340M @2.7GHz. Benchmark evaluates the compression of reference [Silesia Corpus](http://sun.aei.polsl.pl/\~sdeor/index.php?page=silesia) in single-thread mode.

Transfer + Decompression Time @1000Mbit/s (without I/O overwrapping, multithreading)

This benchmark simulates simple "static content transfer" scenario such as OS Kernel compression or video game's static assets (text/images/tables/scripts/etc) which loading from Flash Memory / HDD / SSD.

In this case, compression time is completely ignored. Because only content developers compress the data at once and usually they don't care about its computational cost. But they always care enduser's experience a.k.a. "loading time" and bandwidth.

Please pay attention to "LZ4HC -9" which is quite faster than other methods.

Compression + Transfer + Decompression Time @1000Mbit/s (without I/O overwrapping, multithreading)

This benchmark simulates "dynamic content transfer" scenario such as filesystems, caches, network packets, IPC/RPCs, and databases.

In this case, both compression and decompression times are important. You can observe "Fast compression algorithms" are better than traditional algorithms such as DEFLATE (zlib).

## Documentation The LZ4 block compression format is detailed within [lz4_Block_format](https://github.com/lz4/lz4/blob/master/doc/lz4\_Block\_format.md). For streaming arbitrarily large amount of data, or compress files of any size, a frame format has been established, detailed within the file [lz4_Frame_format](https://github.com/lz4/lz4/blob/master/doc/lz4\_Frame\_format.md).
## Interoperable LZ4 ports and bindings The following versions are provided for languages beyond the C reference version. They are in conformance with the LZ4 [block] and [frame] specifications, and are therefore interoperable. |Language |Author |URL | |---- |---- |---- | |__Python__ multi-threadable | Iotic Labs | https://pypi.python.org/pypi/py-lz4framed |__Python__ standard handlers | Jonathan Underwood | https://pypi.python.org/pypi/lz4 |__Python__ | Christopher Jackson | https://github.com/darkdragn/lz4tools |__Java__ | Adrien Grand | https://github.com/lz4/lz4-java |__Java__ | Apache Commons | https://commons.apache.org/proper/commons-compress/apidocs/org/apache/commons/compress/compressors/lz4/package-summary.html |__Javascript__ (binding) | Pierre Curto | https://github.com/pierrec/node-lz4 |__Javascript__ (port) | Benzinga | https://github.com/Benzinga/lz4js |__C#__ | Milosz Krajewski | https://github.com/MiloszKrajewski/K4os.Compression.LZ4 |__Go__ (port) | Pierre Curto | https://github.com/pierrec/lz4 |__Go__ (cgo) | Sean Cunningham | https://github.com/prequel-dev/plz4 |__Delphi__ | Hanno Hugenberg | https://github.com/Hugie/lz4-delphi |__Rust__ | Artem Navrotskiy | https://github.com/bozaro/lz4-rs |__Rust__ | picoHz | https://github.com/picoHz/lzzzz |__Rust__ | Pascal Seitz | https://github.com/PSeitz/lz4\_flex |__Perl__ | Felix Bytow | http://search.cpan.org/\~autinity/Compress-LZ4Frame |__Delphi__ | Xelitan | https://github.com/Xelitan/LZ4-Compression-Decompression-for-Delphi-Lazarus |__Dart__ | Instantiations | https://pub.dev/documentation/es\_compression/latest/lz4/lz4-library.html |__Lua__ | Witchu Promjunyakul | https://github.com/witchu/lua-lz4 |__Haskell__ | Niklas Hambüchen | https://hackage.haskell.org/package/lz4-frame-conduit |__VA Smalltalk__ | Instantiations | http://www.instantiations.com/docs/91/wwhelp/wwhimpl/js/html/wwhelp.htm#href=pr/compression2.html#pID0E0LB0FA |__WASM__ | Syu Kato | https://github.com/ukyo/lz4.js |__Tcl__ decoder | D. Bohdan | https://wiki.tcl-lang.org/48789 |__Z80 assembly__ decoder | Piotr Drapich | http://www.union.org.pl/download/z80/LZ4\_Z80.asm |__8086 assembly__ decoder| E. C. Masloch | https://hg.pushbx.org/ecm/inicomp/ [block]:https://github.com/lz4/lz4/blob/master/doc/lz4\_Block\_format.md [frame]:https://github.com/lz4/lz4/blob/master/doc/lz4\_Frame\_format.md
## Compatible CLI versions Here are a few compatible alternatives to lz4 command line utility : |Name |Author |URL | |---- |---- |---- | |__C++11 multi-threads__ | Takayuki Matsuoka |https://github.com/t-mat/lz4mt | |__smalLZ4__ | Stephan Brumme |http://create.stephan-brumme.com/smallz4/ | |__briefLZ4__ | Jørgen Ibsen |https://github.com/jibsen/blz4 | |__7Zip with LZ4__ | Tino Reichardt |https://github.com/mcmilk/7-Zip-zstd | |__lz4ultra__ | Emmanuel Marty |https://github.com/emmanuel-marty/lz4ultra |
## Customs LZ4 implementations The following versions compress data blocks with the LZ4 compression algorithm in various programming languages. They use the [block] compression format, and deal with metadata (like `compressed_size`) in various custom ways (or none at all, letting the caller deal with it). Consequently, they are not interoperable with LZ4 command line utility, nor (generally) between themselves. |Language |Author |URL | |-- |-- |-- | |__C#__ streaming | Phill Djonov | https://github.com/pdjonov/Lz4Stream |__Go__ | Branimir Karadzic | https://github.com/bkaradzic/go-lz4 |__PHP__ | Kamijo | https://github.com/kjdev/php-ext-lz4 |__PHP__ decoder (port) | Stephan J. Müller | https://heap.ch/blog/2019/05/18/lz4-decompression/ |__Rust__ | Alex Crichton | https://github.com/rusty-shell/rust-compress/blob/master/src/lz4.rs |__Ruby__ | Komiya Atsushi | https://rubygems.org/gems/lz4-ruby |__Perl__ | Gray | http://search.cpan.org/dist/Compress-LZ4/ |__D__ | Jude Young | http://code.dlang.org/packages/lz4-d |__Lua__ | Christophe Delord | http://cdsoft.fr/bl/bonaluna.html |__Haskell__ | Mark Wotton | https://hackage.haskell.org/package/lz4 |__Haskell__ (streaming) | Sven Mattsen | https://hackage.haskell.org/package/lz4-conduit |__Visual Basic 6__ | Tanner_H | http://www.vbforums.com/showthread.php?840413-Compression-in-VB6-modern-solutions |__Erlang__ | Tetsuya Suzuki | https://github.com/szktty/erlang-lz4 |__OCaml__ | Peter Zotov | https://github.com/whitequark/ocaml-lz4 |__Cuda__ | NVidia | https://github.com/NVIDIA/nvcomp |__WASM__ | Raymond Hill | https://github.com/gorhill/lz4-wasm |__C__ decoder (tiny) | Justine Tunney | https://github.com/jart/cosmopolitan/blob/467504308a103865c058f9a0ac858cc22e72240e/libc/nexgen32e/lz4cpy.c |__ARM Cortex assembly__ decoder | Jens Bauer | https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/lz4-decompression-routine-for-cortex-m0-and-later |__arm64 assembly__ decoder | Siguza | https://github.com/Siguza/lz4dec |__Risc-V assembly__ decoder | Martin Wendt | https://github.com/enthusi/lz4\_rv32i\_decode |__8088 assembly__ decoder | Jim Leonard | http://www.oldskool.org/pc/lz4\_8088 |__6502 & 65C02 assembly__ decoder | Peter Ferrie | https://github.com/pararaum/lz4-6502 |__65c816 assembly__ decoder | Olivier Zardini | http://www.brutaldeluxe.fr/products/crossdevtools/lz4/index.html |__68k assembly__ decoder | Arnaud Carre | https://github.com/arnaud-carre/lz4-68k |__Z80 assembly__ decoder | Edouard Berge | https://groups.google.com/forum/#!topic/lz4c/A6TLHThL0c8 |__Atari XL/XE assembly__ decoder | xxl | http://xxl.atari.pl/lz4-decompressor/ |__v810 assembly__ decoder | Martin Wendt | https://github.com/enthusi/lz4\_v810\_decode |__Lua__ decoder | Scott Lembcke | https://github.com/slembcke/mini-lz4 |__jsonlz4__ decoder | Avi Halachmi | https://github.com/avih/dejsonlz4 : custom Mozilla LZ4 format
## LZ4 is used by #### Operating Systems

#### File Systems

#### Big Data

#### Search Engine

#### Databases

#### Games

#### Graphics

#### Network

#### Storage

#### Caching

### Hardware

#### Other

### Special Thanks to [Takayuki Matsuoka](https://github.com/t-mat/) who greatly contributed to the creation of this LZ4 webpage ---