Alternatives to bzip2

A long-established command-line block-sorting compressor and library for .bz2 files. 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 bzip2.

  • bzip3

    A command-line compressor and library intended as a stronger successor to bzip2.

    bzip3 is intended as a stronger successor to bzip2 with cat, grep and less style helpers, but its .bz3 format is less widely supported.

  • XZ Utils

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

    XZ Utils uses LZMA2 for higher compression ratios and ships on nearly every Linux and BSD system, but it is slow and memory-hungry at high levels.

  • Zstandard

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

    Zstandard compresses much faster with near-zlib ratios, is standardised in RFC 8878 and reads gzip, xz and lz4, though older tools may not recognise .zst files.

  • GNU Gzip

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

    GNU Gzip is faster and its .gz format is read almost everywhere, but it usually compresses less than bzip2 and is single-threaded.

  • Lzip

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

    Lzip uses a simplified LZMA with three-factor integrity checking and data recovery for long-term archiving, but it is single-threaded and less widely used.

  • LZ4

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

    LZ4 trades compression ratio for very fast compression and decompression that scales across CPU cores, under a BSD library and GPL command-line licence.

  • Brotli

    Compress and decompress data using the Brotli format.

    Brotli is an MIT-licensed command-line tool and library, but its stream format lacks checksums and original length metadata.

Similar software

Related functionality, not a direct replacement.