talira

Extremely fast lossless compression, with decoding at RAM speed

open sourceBSD-2-Clause AND GPL-2.0-or-laterfree

LZ4 is a lossless compression algorithm and C library built for speed: compression above 500 MB/s per core, scaling across cores, and decompression at several GB/s per core, often at RAM speed limits. An acceleration factor trades ratio for more speed, and the LZ4_HC variant trades CPU time for a better ratio with the same decompression speed. It supports dictionary compression in the API and the lz4 command-line tool, which combines well with Zstandard's dictionary builder for small files.

Ways to install

Problems it solves

  • compress data as fast as possible in my C application
  • fast compression for logs or network traffic
  • decompress data at RAM speed

Features

  • compression above 500 MB/s per core
  • decompression at multiple GB/s per core
  • LZ4_HC high-compression mode
  • dictionary compression
  • lz4 command-line tool

Alternatives

The same job

These do what LZ4 does.

  1. Zstandard Real-time data compression algorithm
  2. Brotli Google's lossless compression format and reference library, with dense compression at deflate-like speed

Compare LZ4 with the top 3