Introduction

The LZ4 compression utility is a lightweight compression library optimized for ultra-low-power microcontrollers. The software is based on the open source LZ4 specification and algorithm and is compatible with existing LZ4 software and files.

Traditional compression formats such as .gzip, .zip and .7z are optimized for high compression ratio with slow compression and fast decompression performance. These formats are typically used for file transfer where there is a single source and multiple destinations (such as file download). Compressing the files is a one time cost and it’s beneficial to trade compression speed for a higher ratio. While compression may be very slow decompression is typically very fast, up to 100x faster, due to the nature of only needing to unroll the compressed file. While these algorithms are possible to run on an ultra-low-power microcontroller it would typically be impractical and take a significant amount of energy to enable both compression and decompression.

The LZ4 compression algorithm on the other hand is designed for both fast compression and decompression with less focus on compression ratio. This format is well suited for applications with point to point transfer of data such as in large data centers where reducing transfer time is desired but not at the cost of significantly increasing processing power to run compression. This makes LZ4 an excellent choice for an ultra-low-power embedded device where compression and decompression are equally important to target applications. The LZ4 algorithm provides the perfect balance of compression performance and functionality for a wide range of embedded applications such as data logging, expanded data storage, over-the-air data transfers and more.

The LZ4 full specification and open source software can be obtained at http://www.lz4.org.