Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
Livid
275.76D
574.4D
V2EX  ›  Linux

pigz - Parallel Implementation of GZip

  •  
  •   Livid ·
    PRO
    · Oct 29, 2020 · 3125 views
    This topic created in 2021 days ago, the information mentioned may be changed or developed.

    一个可以利用多核心 CPU 来加速压缩的 gzip 实现:

    https://zlib.net/pigz/

    Ubuntu 下可以直接 apt install pigz 安装。

    和原始单核 gzip 的性能对比:

    https://rachaellappan.github.io/pigz/

    6 replies    2020-10-30 03:18:52 +08:00
    lcdtyph
        1
    lcdtyph  
       Oct 29, 2020 via iPhone   ❤️ 4
    一直在用,还有其他格式的几个
    pixz 并行版的 xz
    pbzip2 并行版的 bzip2

    和 tar 联动的话可以这样
    tar -Ipigz -xf xxx.tar.gz
    yyfearth
        2
    yyfearth  
       Oct 29, 2020
    @lcdtyph xz 不支持 multi-core 吗?
    我记得 xz 本来就有--thread 参数啊
    AlohaV2
        3
    AlohaV2  
       Oct 29, 2020   ❤️ 1
    之前试过解压速度和压缩比,zstd 在性价比上是测过最高的,也有 pzstd 库支持并发。
    https://github.com/facebook/zstd/tree/dev/contrib/pzstd
    lcdtyph
        4
    lcdtyph  
       Oct 29, 2020 via iPhone
    @yyfearth
    没,虽然提供了--threads 选项,但是 manpages 里有一句"Multithreaded compression and decompression are not implemented yet,
    so this option has no effect for now."
    AlohaV2
        5
    AlohaV2  
       Oct 29, 2020   ❤️ 1
    @lcdtyph @yyfearth
    7-zip 的 LZMA SDK 支持 xz 多线程解压,不过好像只有 Windows 平台可以。我之前还改过,加了下 Linux 的支持
    https://unique-ptr.com/archives/92.html
    不过后来一顿搜索之后,还是决定转投 zstd 了
    ericFork
        6
    ericFork  
       Oct 30, 2020   ❤️ 1
    两年前测了一大圈,考虑到很多场景下解压速度更重要,zstd 无出其右
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3199 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 43ms · UTC 14:28 · PVG 22:28 · LAX 07:28 · JFK 10:28
    ♥ Do have faith in what you're doing.