Alternatives to LZ4

A lossless compression format and command-line tool built for very high compression and decompression speed. The listings below can replace it for an important use case. Each note says what changes if you switch.

The original

Replacements

Listings that take over the same core job as LZ4.

  • Zstandard

    Meta's compression tool that hits near-zlib ratios at far higher speed, now used across Linux and modern filesystems.

    Zstandard is somewhat slower but reaches much higher ratios close to zlib's, is standardised in RFC 8878 and can also read and write lz4 files.

  • GNU Gzip

    The GNU command-line compression program that creates and decompresses .gz files.

    GNU Gzip produces .gz files read almost everywhere, but it is single-threaded and slower, though its ratio is typically higher than LZ4's.

  • pigz

    A parallel implementation of gzip that uses multiple CPU cores to compress data faster.

    pigz uses all CPU cores to write standard gzip output as a drop-in gzip replacement, though decompression gains little and it may need compiling.

  • Brotli

    Compress and decompress data using the Brotli format.

    Brotli is an MIT-licensed compressor and library for the Brotli format, but its stream format lacks checksums and original length metadata.

  • crabz

    A cross-platform command-line tool for fast parallel compression and decompression, similar to pigz but written in Rust.

    crabz is a multi-threaded Rust compressor for gzip, zlib and Snap streams on macOS and Linux, described by its author as a proof of concept.

  • XZ Utils

    The standard command-line tool for creating and reading .xz files.

    XZ Utils achieves much higher LZMA2 compression ratios than LZ4, but compression is slow and memory-hungry at high levels.

  • bzip2

    A long-established command-line block-sorting compressor and library for .bz2 files.

    bzip2 compresses better than gzip on many inputs and offers limited recovery from damaged media, but is far slower than LZ4.

Also worth comparing

These listings name LZ4 as their own alternative, so the relationship runs both ways.

  • Lzip

    A command-line lossless compressor using a simplified LZMA, designed for long-term archiving and data safety.

    LZ4 focuses on very fast compression and decompression across CPU cores, accepting a lower compression ratio than lzip's LZMA-based format.

  • pixz

    A parallel, indexing xz compressor that allows random access into compressed tar.xz archives.

    LZ4 favours very high speed over ratio, scales across CPU cores, and runs on Windows, macOS and Linux, but compresses less than xz.

Similar software

Related functionality, not a direct replacement.