AI 中文总结
pigzpp是pigz的C++23重写版本,为多语言提供线程安全压缩库,兼具多条目ZIP等功能,在压缩吞吐量上远超pigz和Python的gzip,是AI辅助现代化的案例。
AI 中文摘要
pigz是一款被广泛部署的并行gzip工具,但它的进程全局可变状态意味着它并非为可重入、可直接嵌入的库而设计。pigzpp是从零开始的C++23重写版本,将该设计转变为线程安全的库,其一个加速的DEFLATE核心可提供给C++、Python、WebAssembly、Go和Rust使用。作为基于同一核心构建的应用级便利功能,它还提供多条目ZIP归档和快速PNG编解码器。其可移植的zlib-ng后端保留了gzip/zlib的压缩率;其Intel ISA-L后端是仅适用于x86-64的快速路径,在我们的文本语料库上,它在6级压缩时产生的输出大小约大10%。在该配置下,zlib-ng达到了pigz CLI吞吐量的2.1倍,以及Python内存中gzip吞吐量的16倍;ISA-L分别达到了8.5倍和50倍。输出仍符合标准,可与gzip、pigz和unzip交叉解码。其成果是一个自包含的多平台压缩栈,也是在自动化兼容性测试下进行AI辅助现代化的案例研究。
英文摘要
pigz is a widely deployed parallel gzip utility, but its process-global mutable state means that it was not designed as a reentrant, directly embeddable library. pigzpp is a from-scratch C++23 rewrite that turns the design into a thread-safe library with one accelerated DEFLATE core exposed to C++, Python, WebAssembly, Go, and Rust. As application-level conveniences built on that same core, it also provides multi-entry ZIP archives and a fast PNG codec. Its portable zlib-ng backend preserves gzip/zlib's ratio; its Intel ISA-L backend is an x86-64-only fast path that produces about 10% larger output at level 6 on our text corpus. In that configuration, zlib-ng reaches 2.1 times the CLI throughput of pigz and 16 times that of Python's in-memory gzip; ISA-L reaches 8.5 times and 50 times, respectively. Outputs remain standards-compliant and cross-decode with gzip, pigz, and unzip. The result is a self-contained, multi-platform compression stack and a case study in AI-assisted modernization under automated compatibility tests.