logo
Kurashizu Blogwhere ideas flow
  • Home
  • News
  • Blog
  • About
  • Home
  • News
  • Blog
  • About

© 2026 Kurashizu. All rights reserved.

Admin·New Post·Service Status
Powered by Cloudflare·31.10.26
← Back to news

bzip3

Original article
github.com|219 points|66 comments|by tosh|Sep 7, 2026

bzip3

Build Packaging status

bzip3 is designed as a more powerful, efficient, and modern spiritual successor to the classic BZip2. It aims to provide superior compression ratios and enhanced speed.

🛠 Technical Architecture

The tool achieves its performance through a sophisticated pipeline:

  1. Burrows-Wheeler Transform (BWT): Utilizes suffix arrays for high-speed processing.
  2. RLE with LZ+Prediction: Employs a pass based on LZ77-style string matching combined with PPM-style context modeling.
  3. Entropy Coding: Uses an order-0 context mixing coder.

Note: Much like its predecessor, bzip3 is particularly effective when handling source code or plain text.


🚀 Installation

Depending on your preference, you can install the tool via a package manager or by compiling from the source.

  • Option A: Manual Compilation (if cloning from Git):
    ./configure
    make
    sudo make install
    
  • Option B: macOS Homebrew:
    brew install bzip3
    

📊 Performance Benchmarks

The Perl Source Test

To evaluate the tool, a dataset consisting of every released version of Perl5 was used. The files were gathered via wget, decompressed, and bundled into a single .tar archive.

Compression Command Examples:

  • xz -T16 -9 -k all.tar
  • bzip3 -e -b 511 -j 4 all.tar

Comparison Results:

MethodCompressed Size (Bytes)Wall Clock Time (Compression)
LZMA (xz)2,056,645,2402,056,645,2402,056,645,24012:09.24
bzip23,441,163,9113,441,163,9113,441,163,91117:16.64
bzip3 (-b 256)1,001,957,5871,001,957,5871,001,957,5877:10.10
bzip3 (-b 511)546,456,978\mathbf{546,456,978}546,456,9787:08.65
Zstandard3,076,143,6603,076,143,6603,076,143,6606:35.62

Decompression Speed (WD Blue HDD):

  • Zstandard: 3min 51s
  • bzip3 (parallel): 4min 06s
  • LZMA (xz): 4min 40s
  • bzip2: 9min 22s

Long-Range Deduplication

By combining lrzip (for deduplication) with various back-ends, the following sizes were achieved:

PipelineResulting Size (Bytes)
lrzip + bzip360,672,608\mathbf{60,672,608}60,672,608
lrzip + lzma64,774,20264,774,20264,774,202
lrzip + bzip275,685,06575,685,06575,685,065

⚠️ Disclaimers

[!IMPORTANT] I TAKE NO RESPONSIBILITY FOR ANY LOSS OF DATA ARISING FROM THE USE OF THIS PROGRAM/LIBRARY, HOWSOEVER CAUSED.

Compression inherently assumes that the process is reversible. While the author has invested significant effort into the design and testing of bzip3, the sheer complexity of these algorithms means that perfect software is guaranteed bugs may still exist in rare edge cases.

Warning: Do not use this software for critical data unless you accept the remote possibility that the data may become unrecoverable.


💻 System Compatibility & Specs

Performance Metrics: On x64 Linux using clang13, typical speeds are:

  • Compression: ≈17 MiB/s\approx 17 \text{ MiB/s}≈17 MiB/s per thread.
  • Decompression: ≈23 MiB/s\approx 23 \text{ MiB/s}≈23 MiB/s per thread.

Supported Architectures: bzip3 has been verified on:

  • x86 / x86_64
  • armv6 / armv7 / aarch64
  • ppc64le
  • mips / mips64
  • sparc
  • s390x

For more detailed results, please refer to etc/BENCHMARKS.md.


📜 Licensing

The project as a whole is licensed under LGPLv3. Below is the detailed breakdown of components:

ComponentLicenseCopyright/Author
Main CodebaseLGPLKamila Szewczyk
BWT (libsais) & LZPApache 2.0Ilya Grebnov
build-auxGPL-3+Daniel Richard G, Marc Stevens, Steven G. Johnson
ax_check_compile_flag.m4FSFAPGuido U. Draheim, Maarten Bosmans
git-version-genGPLv3Free Software Foundation, Inc
bz3grepBSD-2-clauseThomas Klausner