<a name="benchmarks"></a> 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. <div> <ul id="tabs" class="nav nav-tabs" data-tabs="tabs"> <li class="active"><a href="#tab-1" data-toggle="tab">Transfer + Decompression Time<br/>@1000Mbit/s</a></li> <li ><a href="#tab-2" data-toggle="tab">Compression + Transfer + Decompression Time<br/>@1000Mbit/s</a></li> </ul> <div id="my-tab-content" class="tab-content"> <div id="tab-1" class="tab-pane container-fluid active"> <div class="row"> <div class="col-md-4 text-justify"> <h2>Transfer + Decompression Time @1000Mbit/s <small>(without I/O overwrapping, multithreading)</small></h2> <p> 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. </p> <p> 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. </p> <p> Please pay attention to "LZ4HC -9" which is quite faster than other methods. </p> </div> <div class="col-md-8" style="height:34em;" data-csv-props='{ "csvSrc": "csv/benchmark-silesia-1000mbps-offline-compression.csv", "csvGvType": "google.visualization.ColumnChart", "csvGvPackage": "corechart", "chartArea": {"width": "80%", "height": "30em"}, "legend": {"position": "top"}, "isStacked": "true", "vAxis": {"title": "Seconds" }, "title": "Transfer + Decompression Time\nSMALLER IS BETTER" }' ></div> </div> </div> <div id="tab-2" class="tab-pane container-fluid"> <div class="row"> <div class="col-md-4 text-justify"> <h2>Compression + Transfer + Decompression Time @1000Mbit/s <small>(without I/O overwrapping, multithreading)</small></h2> <p> This benchmark simulates "dynamic content transfer" scenario such as filesystems, caches, network packets, IPC/RPCs, and databases. </p> <p> 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). </p> </div> <div class="col-md-8" style="height:34em;" data-csv-props='{ "csvSrc": "csv/benchmark-silesia-1000mbps.csv", "csvGvType": "google.visualization.ColumnChart", "csvGvPackage": "corechart", "chartArea": {"width": "80%", "height": "30em"}, "legend": {"position": "top"}, "isStacked": "true", "vAxis": {"title": "Seconds" }, "title": "Compression + Transfer + Decompression Time\nSMALLER IS BETTER" }' ></div> </div> </div> </div> </div> ## Documentation The LZ4 block compression format is detailed within [lz4_Block_format](lz4_Block_format.html). 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](lz4_Frame_format.html). <br/> <a name="interoperable-lz4"></a> ## 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 | |---- |---- |---- | |__Javascript__ | Pierre Curto |https://github.com/pierrec/node-lz4 | |__Python multi-threadable__ | Vilnis Termanis |https://github.com/Iotic-Labs/py-lz4framed | |__Python__ | Christopher Jackson |https://github.com/darkdragn/lz4tools | |__Perl__ | Felix Bytow |http://search.cpan.org/~autinity/Compress-LZ4Frame | |__Delphi__ | Hanno Hugenberg |https://github.com/Hugie/lz4-delphi | |__Go__ | Pierre Curto |https://github.com/pierrec/lz4 | |__Rust__ | Artem Navrotskiy |https://github.com/bozaro/lz4-rs | |__Lua__ | Witchu Promjunyakul |https://github.com/witchu/lua-lz4 | |__Z80 assembly__ decoder | Piotr Drapich |http://www.union.org.pl/download/z80/LZ4_Z80.asm | [block]:lz4_Block_format.md [frame]:lz4_Frame_format.md <br/> <a name="lz4-clis"></a> ## 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 | |__LZ4X__ | Ilya Muravyov |https://github.com/encode84/lz4x | |__smalLZ4__ | Stephan Brumme |http://create.stephan-brumme.com/smallz4/ | |__7Zip with LZ4__ | Tino Reichardt |https://github.com/mcmilk/7-Zip-zstd | <br/> <a name="customs-lz4"></a> ## Customs LZ4 ports and bindings The following versions compress data blocks with LZ4 compression algorithm in various programming languages. They use the [block] compression format, but add their own frame / header logic. They are not interoperable with LZ4 command line utility. |Language |Author |URL | |-- |-- |-- | |__Java__ |Adrien Grand |https://github.com/jpountz/lz4-java | |__Python__ |Steeve Morin |http://pypi.python.org/pypi/lz4 | |__Perl__ |Gray |http://search.cpan.org/dist/Compress-LZ4/ | |__C#__ |Milosz Krajewski |https://github.com/MiloszKrajewski/lz4net | |__C#__ streaming |Phill Djonov |https://github.com/pdjonov/Lz4Stream | |__Go__ |Branimir Karadzic |https://github.com/bkaradzic/go-lz4 | |__Ruby__ |Komiya Atsushi |http://rubygems.org/gems/lz4-ruby | |__PHP__ |Kamijo |https://github.com/kjdev/php-ext-lz4 | |__Lua__ |Christophe Delord |http://cdsoft.fr/bl/bonaluna.html | |__D__ |Jude Young |http://code.dlang.org/packages/lz4-d | |__Haskell__ |Mark Wotton |http://hackage.haskell.org/package/lz4 | |__Erlang__ |Tetsuya Suzuki |https://github.com/szktty/erlang-lz4 | |__Smalltalk__ (Pharo) |Mariano Martinez Peck |http://smalltalkhub.com/#!/~marianopeck/LZ4/ | |__OCaml__ |Peter Zotov |https://github.com/whitequark/ocaml-lz4 | |__Rust__ |Alex Crichton |http://alexcrichton.com/rust-compress/compress/lz4/index.html | |__ARM Cortex assembly__ decoder |Jens Bauer |http://community.arm.com/docs/DOC-10570 | |__8088 assembly__ decoder |Jim Leonard |http://www.oldskool.org/pc/lz4_8088 | |__6502 & 65C02 assembly__ decoder |Peter Ferrie |http://pferrie.host22.com/misc/appleii.htm | |__65c816 assembly__ decoder |Olivier Zardini |http://www.brutaldeluxe.fr/products/crossdevtools/lz4/index.html | |__Atari XL/XE assembly__ decoder |xxl |http://xxl.atari.pl/lz4-decompressor/ | |__Z80 assembly__ decoder |Edouard Berge |https://groups.google.com/forum/#!topic/lz4c/A6TLHThL0c8 | |__jsonlz4__ | Avi Halachmi |https://github.com/avih/dejsonlz4 : custom Mozilla LZ4 format for Firefox bookmark backup | <br/> <a name="references"></a> ## LZ4 is used by #### Operating Systems <div id="lz4usedby" class="container"> <ul id="icons" class="list-inline"> <li><a href="https://www.linux.org" ><img src="images/logo50/linux.png" /><span> Linux</span></a></li> <li><a href="https://www.freebsd.org/"><img src="images/logo50/freebsd.png"/><span> FreeBSD</span></a></li> <li><a href="https://www.illumos.org/"><img src="images/logo50/illumos.png"/><span> Illumos</span></a></li> <li><a href="https://smartos.org/" ><img src="images/logo50/smartos.png"/><span> SmartOS</span></a></li> <li><a href="http://coreboot.org/" ><img src="images/logo50/coreboot.png"/><span> coreboot</span></a></li> </ul> </div> #### File Systems <div id="lz4usedby" class="container"> <ul id="icons" class="list-inline"> <li><a href="https://www.open-zfs.org/wiki/Main_Page"><img src="images/logo50/openzfs.png" /><span> OpenZFS</span></a></li> <li><a href="https://www.dragonflybsd.org/hammer/" ><img src="images/logo50/hammer.png" /><span> HAMMER2</span></a></li> <li><a href="https://squashfs.sourceforge.net/" ><img src="images/logo50/squashfs.png"/><span> SquashFS</span></a></li> <li><a href="http://www.lessfs.com/wordpress/" ><img src="images/logo50/lessfs.png" /><span> LessFS</span></a></li> <li><a href="https://leo-project.net/leofs/" ><img src="images/logo50/leofs.png" /><span> LeoFS</span></a></li> <li><a href="https://www.gnu.org/software/grub/" ><img src="images/logo50/grub.png" /><span> GNU GRUB</span></a></li> </ul> </div> #### Big Data <div id="lz4usedby" class="container"> <ul id="icons" class="list-inline"> <li><a href="https://hadoop.apache.org/" ><img src="images/logo50/hadoop.png" /><span> Hadoop</span></a></li> <li><a href="https://cassandra.apache.org/" ><img src="images/logo50/cassandra.png" /><span> Cassandra</span></a></li> <li><a href="https://hbase.apache.org/" ><img src="images/logo50/hbaseW90.png" /><span> Hbase</span></a></li> <li><a href="https://spark.apache.org/" ><img src="images/logo50/spark.png" /><span> Spark</span></a></li> <li><a href="https://github.com/chango/hustle" ><img src="images/logo50/hustleW90.png" /><span> Hustle</span></a></li> </ul> </div> #### Search Engine <div id="lz4usedby" class="container"> <ul id="icons" class="list-inline"> <li><a href="https://lucene.apache.org/" ><img src="images/logo50/lucene.png" /><span> Lucene</span></a></li> <li><a href="https://lucene.apache.org/solr/" ><img src="images/logo50/solr.png" /><span> solr</span></a></li> <li><a href="https://www.scalyr.com/" ><img src="images/logo50/scalyr.png" /><span> Scalyr</span></a></li> <li><a href="https://kafka.apache.org/" ><img src="images/logo50/kafka.png" /><span> Kafka</span></a></li> </ul> </div> #### Databases <div id="lz4usedby" class="container"> <ul id="icons" class="list-inline"> <li><a href="https://www.mysql.com/" ><img src="images/logo50/mysql.png" /><span> MySQL</span></a></li> <li><a href="https://rocksdb.org/" ><img src="images/logo50/rocksdb.png" /><span> RocksDB</span></a></li> <li><a href="https://www.tokutek.com/tokudb-for-mysql/" ><img src="images/logo50/tokudb.png" /><span> Tokudb</span></a></li> <li><a href="http://redis.io/" ><img src="images/logo50/redis.png" /><span> Redis</span></a></li> <li><a href="https://www.delphix.com/" ><img src="images/logo50/delphix.png" /><span> Delphix</span></a></li> <li><a href="http://www.infinisql.org/" ><img src="images/logo50/infinisql.png" /><span> infiniSQL</span></a></li> <li><a href="http://sphia.org/" ><img src="images/logo50/sophia50.png" /><span> Sophia</span></a></li> <li><a href="https://olegdb.org/" ><img src="images/logo50/olegdb.png" /><span> OlegDB</span></a></li> <li><a href="https://gemtalksystems.com/products/gs64/" ><img src="images/logo50/gemstone.png" /><span> GemStone</span></a></li> <li><a href="https://www.percona.com/blog/2016/08/11/percona-server-mongodb-3-2-8-2-0-now-available/"> <img src="images/logo50/percona.png" /><span> Percona</span></a></li> </ul> </div> #### Games <div id="lz4usedby" class="container"> <ul id="icons" class="list-inline"> <li><a href="https://www.battlefield.com/battlefield-4" ><img src="images/logo50/battlefield4.png" /><span> Battlefield 4</span></a></li> <li><a href="https://www.guildwars2.com/" ><img src="images/logo50/guildwars2.png" /><span> Guild Wars 2</span></a></li> <li><a href="http://www.crytek.com/" ><img src="images/logo50/crytek.png" /><span> Crytek</span></a></li> <li><a href="https://www.callofduty.com/fr/blackops3" ><img src="images/logo50/blackOps3.png" /><span> Black Ops 3</span></a></li> <li><a href="https://www.sinemoragame.com/" ><img src="images/logo50/sinemora.png" /><span> Sine Mora</span></a></li> <li><a href="https://www.mediatonic.co.uk/blog/1000-tiny-claws-out-today"><img src="images/logo50/1000tinycraws.png" /><span> 1000 Tiny Claws</span></a></li> </ul> </div> #### Graphics <div id="lz4usedby" class="container"> <ul id="icons" class="list-inline"> <li><a href="https://www.nvidia.com/" ><img src="images/logo50/nvidia.png" /><span> nVidia</span></a></li> <li><a href="https://www.enlightenment.org/" ><img src="images/logo50/enlightment.png" /><span> Enlightenment</span></a></li> <li><a href="https://www.xpra.org/" ><img src="images/logo50/xpra.png" /><span> Xpra</span></a></li> <li><a href="https://www.openvdb.org/" ><img src="images/logo50/openvdb.png" /><span> OpenVDB</span></a></li> <li><a href="https://pixinsight.com/" ><img src="images/logo50/pixInsight.png" /><span> PixInsight</span></a></li> <li><a href="https://scap.codeplex.com/" ><img src="images/logo50/placeholder.png" /><span> Scaplib</span></a></li> <li><a href="https://github.com/flanglet/kanzi" ><img src="images/logo50/placeholder.png" /><span> kanzi</span></a></li> </ul> </div> #### Network <div id="lz4usedby" class="container"> <ul id="icons" class="list-inline"> <li><a href="https://www.freenas.org/" ><img src="images/logo50/freenas.png" /><span> freeNAS</span></a></li> <li><a href="https://openvpn.net/" ><img src="images/logo50/openvpn.png" /><span> openVPN</span></a></li> <li><a href="https://netty.io/" ><img src="images/logo50/netty.png" /><span> Netty</span></a></li> <li><a href="https://dovecot.org/" ><img src="images/logo50/dovecot.png" /><span> dovecot</span></a></li> <li><a href="https://www.virtualhere.com/" ><img src="images/logo50/virtualhere.png" /><span> virtualHere</span></a></li> <li><a href="http://www.linbit.com/" ><img src="images/logo50/linbitW90.png" /><span> linBit</span></a></li> </ul> </div> #### Storage <div id="lz4usedby" class="container"> <ul id="icons" class="list-inline"> <li><a href="https://www.datastax.com/" ><img src="images/logo50/datastax.png" /><span> DataStax</span></a></li> <li><a href="https://www.hybrid-san.co.uk/" ><img src="images/logo50/nimblestorage.png" /><span> Nimble Storage</span></a></li> <li><a href="https://www.nexenta.com/" ><img src="images/logo50/nexenta.png" /><span> Nexenta</span></a></li> <li><a href="https://kaminario.com/flash-array/" ><img src="images/logo50/k2spear.png" /><span> K2 Spear</span></a></li> <li><a href="https://syneto.net/" ><img src="images/logo50/syneto.png" /><span> Syneto OS</span></a></li> </ul> </div> #### Caching <div id="lz4usedby" class="container"> <ul id="icons" class="list-inline"> <li><a href="https://en.wikipedia.org/wiki/ZRam" ><img src="images/logo50/linux.png" /><span> Zram</span></a></li> <li><a href="https://hhvm.com/" ><img src="images/logo50/hhvm.png" /><span> HHVM</span></a></li> <li><a href="http://kripken.github.io/emscripten-site/" ><img src="images/logo50/emscripten.png" /><span> Emscripten</span></a></li> <li><a href="https://www.zend.com/" ><img src="images/logo50/zend.png" /><span> PHP Zend Optimizer</span></a></li> </ul> </div> #### Other <div id="lz4usedby" class="container"> <ul id="icons" class="list-inline"> <li><a href="https://www.mozilla.org/" ><img src="images/logo50/firefox.png" /><span> Mozilla Firefox</span></a></li> <li><a href="https://www.bareos.org/en/" ><img src="images/logo50/bareos.png" /><span> Bareos</span></a></li> <li><a href="https://gtkwave.sourceforge.net/" ><img src="images/logo50/gtkwave.png" /><span> GTKWave</span></a></li> <li><a href="https://www.blosc.org/" ><img src="images/logo50/placeholder.png" /><span> Blosc</span></a></li> <li><a href="https://bitbucket.org/facebook/lz4revlog" ><img src="images/logo50/fb-mercurial.png" /><span> Facebook&#x27;s Mercurial</span></a></li> <li><a href="https://github.com/ptaoussanis/nippy" ><img src="images/logo50/placeholder.png" /><span> Nippy</span></a></li> <li><a href="https://www.freedesktop.org/wiki/Software/systemd" ><img src="images/logo50/freedesktop.png" /><span> systemd</span></a></li> <li><a href="http://zhengxwen.github.io/gdsfmt/" ><img src="images/logo50/bioconductor50.png" /><span> gdsfmt</span></a></li> <li><a href="https://www.rarelogic.com/" ><img src="images/logo50/rarelogic.png" /><span> Rarelogic</span></a></li> <li><a href="http://logscape.com/" ><img src="images/logo50/logscape.png" /><span> Logscape</span></a></li> <li><a href="https://github.com/funcodeio/lz4.vim" ><img src="images/logo50/placeholder.png" /><span> vim editor</span></a></li> <li><a href="https://iotic-labs.com/" ><img src="images/logo50/iotic.png" /><span> Iotic Labs</span></a></li> </ul> </div> ### Special Thanks to [Takayuki Matsuoka](https://github.com/t-mat/) who greatly contributed to the creation of this LZ4 webpage ---