BZip2 继任者发布,压缩比与速度双提升
推荐指数 63.0 NO. 012 · 2026.09.08
发布2026/09/07Score336Comments95
为什么值得看
BZip3 是 BZip2 的精神续作,采用上下文混合熵编码器、后缀数组优化的 Burrows-Wheeler 变换以及 LZ77+PPM 混合压缩策略。对需要处理大量文本或代码压缩的 AI 工程师来说,这是替代 gzip/zstd 场景下值得实测的新选项。
编辑判断
文本/代码压缩在 AI 工作流里被严重低估——训练数据预处理、模型权重分发、日志归档都依赖它。之前这个场景的主流选择是 zstd(速度优先)或 xz(压缩比优先),但 BZip2 家族在文本上的压缩密度其实一直有优势,只是速度太慢被边缘化。
BZip3 的改进方向很明确:用后缀数组把 BWT 做到线性时间,再用 order-0 上下文混合替代霍夫曼编码。作者用 Perl 全版本发布包做了 benchmark,这种真实世界文本测试比 Canterbury Corpus 更有说服力。
如果你在做大规模语料清洗或需要把模型 checkpoint 压到极限体积,值得把它加进压缩工具链的 benchmark 列表。注意它目前还是单线程实现,吞吐量场景下需要配合分块并行。
社区反馈
意见分歧 87 条评论
核心争论:bzip3 的 benchmark 是否公平,能否真正替代 zstd
Impressive compression benchmark. Four times smaller than z standard.
with zstd at level 16 with default params (dict size, ...). Serious compression starts at level 19 and with much higher dict sizes. how is this an honest benchmark: bzip3 ... 12178M memory zstd ... 687M memory
There is a comparison with "zstd -19" on the Silesia corpus, showing better compression ratio for bzip3 (47.2 vs 53MB) while being ~5 times faster (and using only half the memory). Even if the examples are highly cherry-picked, it is quite suprising to me that such pareto-dominance is possible at al