bzip3

iczeliaLGPL-3.0活跃维护

BZip2 的精神续作,用 C 语言实现,压缩率更高、速度更快,适合替代 BZip2 做通用数据压缩。

A better and stronger spiritual successor to bzip2.

1.5.5发布于 2026-10-22 10:34 UTC1,533star +1 / 7 天68fork同步于 2026-11-10 11:47 UTC

怎么上手

由 README 提炼,执行前请确认
./bootstrap.sh
./configure && make && sudo make install
硬件要求按 README 说明

README 未给出显存或 GPU 要求;已测试 x86、x86_64、armv6、armv7、aarch64、ppc64le、mips、mips64、sparc、s390x 架构,性能高度依赖编译器,x64 Linux clang13 构建每线程约 17MiB/s 压缩、23MiB/s 解压。

支持 Apple Silicon
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

bzip2 的精神继任者,压缩率更高、速度更快,尤其擅长压缩文本和代码

BZip2 的精神续作,用 C 语言实现,压缩率更高、速度更快,适合替代 BZip2 做通用数据压缩。

核心能力

  • 采用 order-0 上下文混合熵编码器提升压缩率
  • 用后缀数组实现快速 Burrows-Wheeler 变换
  • 结合 LZ77 式匹配与 PPM 式上下文建模的 LZP 预处理
  • 支持 -b 块大小与 -j 多线程并行压缩
  • 提供 libbz3 库与 bz3grep 工具

容易踩的坑

从 git 克隆需先运行 ./bootstrap.sh,源码包则不需要;性能高度依赖编译器,Windows 和 32 位构建可能明显更慢;作者声明不对数据丢失负责,重要数据压缩前请自行备份

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本1.5.5
  1. 1.5.5最新正式版2026-10-22 · 2026-10-22 10:34 UTC

    这个版本没有写更新说明。

  2. 1.5.42026-09-07 · 2026-09-07 19:53 UTC

    这个版本没有写更新说明。

  3. 1.5.32025-08-13 · 2025-08-13 09:29 UTC

    这个版本没有写更新说明。

  4. 1.5.22025-04-28 · 2025-04-28 08:45 UTC

    这个版本没有写更新说明。

  5. 1.5.12024-12-16 · 2024-12-16 15:03 UTC

    这个版本没有写更新说明。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    BZip3

    Build

    A better, faster and stronger spiritual successor to BZip2. Features higher compression ratios and better performance thanks to a order-0 context mixing entropy coder, a fast Burrows-Wheeler transform code making use of suffix arrays and a RLE with Lempel Ziv+Prediction pass based on LZ77-style string matching and PPM-style context modeling.

    Like its ancestor, BZip3 excels at compressing text or code.

    Installation

    # If using a git clone (not needed for source packages), first...
    $ ./bootstrap.sh
    
    # All...
    $ ./configure
    $ make
    $ sudo make install
    

    Alternatively, you might be able to install bzip3 using your system's package manager:

    Packaging status

    On macOS, you can use Homebrew to easily install:

    $ brew install bzip3
    

    Perl source code benchmark

    First, I have downloaded every version of Perl5 ever released and decompressed them.

    % wget -r -l1 -nH --cut-dirs=2 --no-parent -A.tar.gz --no-directories https://www.cpan.org/src/5.0/
    % for g in *.gz; do gunzip $g; done
    % ls -la | wc -l
    262
    

    Then, I put all the resulting .tar files in a single .tar file and tried to compress it using various compressors:

    xz -T16 -9 -k all.tar  10829.91s user 26.91s system 1488% cpu 14658M memory 12:09.24 total
    bzip2 -9 -k all.tar  981.78s user 9.77s system 95% cpu 8M memory 17:16.64 total
    bzip3 -e -b 256 -j 12 all.tar  2713.81s user 16.28s system 634% cpu 18301M memory 7:10.10 total
    bzip3 -e -b 511 -j 4 all.tar  17.65s user 12.19s system 170% cpu 12178M memory 7:08.65 total
    zstd -T12 -16 all.tar  4162.94s user 16.40s system 1056% cpu 687M memory 6:35.62 total
    

    The results follow:

    MethodCompressed size (bytes)
    LZMA (xz)2'056'645'240
    bzip23'441'163'911
    bzip3 -b 2561'001'957'587
    bzip3 -b 511546'456'978
    Zstandard3'076'143'660

    Finally, wall clock time decompression times (WD Blue HDD):

    MethodDecompression time
    LZMA (xz)4min 40s
    bzip29min 22s
    bzip3 (parallel)4min 06s
    Zstandard3min 51s

    Then, I used lrzip to perform long-range deduplication on the original .tar file:

    % time lrzip -n -o all_none.tar.lrz all.tar
    546.17s user 160.87s system 102% cpu 10970M memory 11:28.00 total
    
    % time lrzip --lzma -o all_lzma.tar.lrz all.tar
    702.16s user 161.87s system 122% cpu 10792M memory 11:44.83 total
    
    % time lrzip -b -o all_bzip2.tar.lrz all.tar
    563.93s user 147.38s system 112% cpu 10970M memory 10:34.10 total
    

    Finally, I compressed the resulting none.tar.lrz file using bzip3:

    % time bzip3 -e -b 256 -j 2 all_none.tar.lrz
    32.05s user 0.76s system 146% cpu 2751M memory 22.411 total
    

    The results follow:

    MethodCompressed size (bytes)
    lrzip + bzip360'672'608
    lrzip + lzma64'774'202
    lrzip + bzip275'685'065

    For further benchmarks against Turbo-Range-Coder and BSC, check powturbo's benchmark of bzip3, bzip2, bsc and others.

    Disclaimers

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

    Every compression of a file implies an assumption that the compressed file can be decompressed to reproduce the original. Great efforts in design, coding and testing have been made to ensure that this program works correctly.

    However, the complexity of the algorithms, and, in particular, the presence of various special cases in the code which occur with very low but non-zero probability make it impossible to rule out the possibility of bugs remaining in the program.

    DO NOT COMPRESS ANY DATA WITH THIS PROGRAM UNLESS YOU ARE PREPARED TO ACCEPT THE POSSIBILITY, HOWEVER SMALL, THAT THE DATA WILL NOT BE RECOVERABLE.

    That is not to say this program is inherently unreliable. Indeed, I very much hope the opposite is true. Bzip3/libbz3 has been carefully constructed and extensively tested.

    Bzip3's performance is heavily dependent on the compiler. x64 Linux clang13 builds usually can go as high as 17MiB/s compression and 23MiB/s decompression per thread. Windows and 32-bit builds might be considerably slower.

    Bzip3 has been tested on the following architectures:

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

    Corpus benchmarks

    visualisation of the benchmarks

    Check etc/BENCHMARKS.md for more results.

    Licensing

    A breakdown of components and their licenses follows:

    • (runtime) The codebase as a whole: Copyright 2022-2023, Kamila Szewczyk ([email protected]); LGPL (LICENSE)
    • (runtime) The Burrows-Wheeler transform (libsais) and LZP code: 2021-2022, Ilya Grebnov ([email protected]); Apache 2.0 (3rdparty/libsais-LICENSE)
    • (compile-time) build-aux: Copyright 2011, Daniel Richard G ([email protected]), 2019, Marc Stevens ([email protected]), 2008, Steven G. Johnson ([email protected]); GPL-3+ with AutoConf exception
    • (compile-time) build-aux/ax_check_compile_flag.m4: Copyright 2008, Guido U. Draheim ([email protected]), 2011, Maarten Bosmans ([email protected]); FSFAP
    • (compile-time) build-aux/git-version-gen: Copyright 2007-2012, Free Software Foundation, Inc; GPLv3
    • (runtime) bz3grep: Copyright 2003, Thomas Klausner; BSD-2-clause

    bzip3 as a whole is licensed under LGPLv3 only. It is not dual-licensed under LGPLv3 and Apache 2.0.

    Thanks

    • Ilya Grebnov for his libsais library used for BWT construction in BZip3 and the LZP encoder which I had used as a reference implementation to improve myself.
    • Caleb Maclennan for configuring autotools as a packaging-friendly build system for BZip3.
    • Ilya Muravyov for his public domain BWT post-coder, a derivative of which is used in this project.