LZ4

A lossless compression format and command-line tool built for very high compression and decompression speed.

These buttons open the developer's own site, repository or store listing in a new tab. wares.gg does not host downloads.

About LZ4

LZ4 is a lossless compression algorithm that favours speed over ratio. Compression runs at more than 500 MB/s per core and scales across cores, while decompression reaches several GB/s per core, often limited by RAM speed.

The project provides the lz4 command-line program for compressing and decompressing files as well as the library used by many other programs. It suits large logs, backups and data pipelines where time matters more than the smallest possible file.

Strengths

  • Very fast compression and decompression
  • Scales across CPU cores
  • Widely supported format

Limitations

  • Lower compression ratio than zstd or xz
  • Compresses single files or streams, not a full archiver
  • Command line only

Details

Pricing
FreeFree and open source.
License
BSD-2-Clause (library), GPL-2.0 (command-line tool)
Developer
The LZ4 contributors
Platforms
Windows, macOS, Linux, Command line
How it runs
Downloadable app
Account
Not required
Works offline
Yes
Best suited for
Compressing large files or streams quickly where speed beats ratio
Last verified
Added
Provenance
Facts checked against the developer's own pages and store listings, 1 sources on file.

Alternatives to LZ4

Compare all

Software that can replace LZ4 for an important use case, and what changes if you switch.

  • 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.

LZ4 as an alternative

Listings that name LZ4 as an alternative.

  • 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 necessarily a direct replacement.

Report a wrong fact or a dead link on this listing