lzbench

inikep活跃维护

在内存中对 brotli、lz4、zstd、zlib 等开源压缩器做统一跑分对比,方便按速度和压缩比挑选合适的压缩算法。

lzbench is an in-memory benchmark of open-source compressors

v2.4发布于 2026-09-27 17:07 UTC1,104star +1 / 7 天224fork同步于 2026-11-10 17:53 UTC

怎么上手

由 README 提炼,执行前请确认
make -j$(nproc)
硬件要求按 README 说明

README 未给出统一显存或内存门槛;多数压缩器为纯 CPU 实现,仅 gpucompact 与 nvcomp 标注 CUDA only,其中 nvcomp 需 make ENABLE_CUDA=1 才编译。CI 覆盖 Linux x86-64/x86-32/ARM64/ARM32/PPC64LE、macOS arm64 与 Windows MinGW。

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

项目说明

由 README 自动翻译提炼

把几十种开源压缩算法编进一个可执行文件,在同一台机器上公平对比压缩率与速度

在内存中对 brotli、lz4、zstd、zlib 等开源压缩器做统一跑分对比,方便按速度和压缩比挑选合适的压缩算法。

核心能力

  • 把各压缩器源码统一编译进单个可执行文件,消除编译器与优化差异
  • 先把输入文件读入内存,再逐个压缩解压并校验输出与原文一致
  • 支持 -e 按算法与级别选择,如 -ebrotli,2,5/zstd 只测指定级别
  • 支持 -t 按秒限时、-i 按迭代次数两种计时方式
  • 支持 -o 输出 markdown 并按指定列排序,-r 递归测试整个目录

容易踩的坑

需 GNU 兼容的 C/C++ 编译器,推荐 GCC 7.1+ 或 Clang 6.0+;部分压缩器默认不编译,如 aocl-compression 需 make DONT_BUILD_AOCL=0;density、mbrotli、mzstd、pulsar 等依赖 Rust 工具链,skim 依赖 Zig,go-brrr 依赖 Go 1.22+,缺失时会被跳过。

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

最近发版

5 个版本v2.4
  1. v2.4lzbench v2.4最新正式版2026-09-27 · 2026-09-27 17:07 UTC
    • added GPUCompact 1.1 (by @UDPSendToFailed)
    • added lbzip2 2.6.5 (thanks to @caius72)
    • added mbrotli 0.5.2 (by @Mnwa)
    • added misa77 0.6.0 (by @welcome-to-the-sunny-side)
    • added OpenZL v0.2.3 (thanks to @fwyzard)
    • added pulsar 2.5.0 (thanks to @ceedot-rock)
    • updated aceapex to 1.0.1 (thanks to @yasha1971-coder)
    • updated bzip3 to 1.5.4
    • updated libdeflate to v1.26
    • updated lzav to 5.17 (thanks to @avaneev)
    • updated lzham to upstream master as of 2020-09-15 (public-domain licence)
    • updated lzma to 26.03
    • updated memlz to 0.5 beta (thanks to @rrrlasse); fixes unaligned accesses, re-enabled on 32-bit ARM
    • updated nvcomp to support CUDA 13 and cccl 3 (thanks to @fwyzard)
    • updated ppmd8 to 26.03
    • updated slz to 1.3.1
    • updated snappy to 1.3.1; fixes a uint32_t overflow on malformed input, faster on RISC-V
    • updated tamp to 2.3.0
    • updated xz to 5.8.4; fixes an invalid memory access in liblzma decoders after a failed allocation
    • updated zxc to 0.14.1 (thanks to @hellobertrand)
    • improvement: autodetect whether linking with -ldl is required (thanks to @fwyzard)
    • improvement: added a CUDA build job (nvcc 13.2, Ubuntu 24.04) to the Azure Pipelines CI
    • improvement: the Rust codecs (density, mbrotli, pulsar) are built into a single library from misc/rust-codecs, so a BUILD_STATIC=1 binary can link more than one of them
    • improvement: the crates.io dependencies of the Rust codecs are vendored in misc/rust-codecs/vendor, so they build without network access
    • improvement: "make" no longer reruns cargo and recompiles bench/lzbench.o every time; the Rust library is rebuilt only when its sources or the set of Rust codecs change
    • improvement: tornado is now benchmarked on RISC-V hardware whose misaligned scalar access is fast (detected with the hwprobe syscall), instead of being disabled outright (thanks to @zqb-all)
    • improvement: the Makefile now generates header dependencies (-MMD -MP), so editing a header or a .cpp that another .cpp #includes (aceapex, lzo, ucl, tamp, 7-zip) rebuilds the affected objects instead of relinking stale ones
    • improvement: CI now runs every codec on incompressible and tiny inputs, and has a native static build job that links the Rust (density, mbrotli, pulsar) and Zig (skim) codecs
    • improvement: RUST_TARGET_CPU sets the CPU the Rust codecs are compiled for (default: native); the release binaries use x86-64, as a native build contains e.g. AVX-512 code and dies with SIGILL on CPUs without it
    • fix: codecs whose init() fails are now skipped instead of being benchmarked with a NULL work_mem, which used to SEGFAULT (e.g. "lzbench -eCUDA" without a GPU)
    • fix: libdeflate leaked a decompressor on every decompression call (thanks to @wu-zhao-min)
    • fix: aceapex corrupted inputs smaller than 768 bytes (thanks to @yasha1971-coder)
    • fix: memory and file handle leaks when an input file cannot be read, or when a memory allocation fails (thanks to @wu-zhao-min)
    • fix: density was enabled with Cargo 1.82-1.84, which cannot build its edition 2024 crate, so the build failed; it is now skipped below 1.85
    • fix: aceapex double-free on empty compression streams (thanks to @zqb-all)
    • fix: changing the set of codecs (e.g. DONT_BUILD_MBROTLI=1) left stale bench objects that failed to link; they are now rebuilt
  2. v2.3lzbench v2.32026-06-15 · 2026-06-15 17:15 UTC
    查看更新说明
    • improvement: Reorganized compressor alias groups by type — ALL is now a composite of LZ / SYMMETRIC / MISC; BWT/PPM codecs (bsc, bzip2, bzip3, ppmd8) moved to SYMMETRIC, and kanzi is split by per-level algorithm between LZ and SYMMETRIC
    • improvement: Added the FASTEST alias (every ALL compressor at only its fastest level) and a new SLOW alias for very slow compressors (glza)
    • improvement: CUDA codecs are now disabled by default and built only with ENABLE_CUDA=1
    • improvement: BSC now handles blocks larger than its input limit by splitting them into chunks (thanks to @flanglet); the codec max input size is a codec property used when sizing buffers
    • improvement: added -mno-strict-align build flag and SNAPPY_HAVE_RVV macro for RISC-V (thanks to @anthony-zy); various platform fixes for 32-bit x86 (lzham), 32-bit ARM, and Windows file size handling
    • fix: account for codec chunk split buffer overhead when allocating the compression buffer
    • added aceapex 1.0 (thanks to @yasha1971-coder)
    • added aceapex_cuda 0.9 — optional CUDA decoder for the aceapex format (thanks to @yasha1971-coder)
    • added memlz 0.2 beta (thanks to @rrrlasse)
    • added skim 0.1.0 (thanks to @VantorreWannes)
    • added zxc 0.11.0 (thanks to @hellobertrand)
    • updated brotli to 1.2.0 (thanks to @data-man)
    • updated bzip3 to v1.5.3 (thanks to @inikep)
    • updated glza to v0.12 (thanks to @tansy)
    • updated kanzi to 2.5.3 (thanks to @flanglet)
    • updated libbsc to v3.3.12 (thanks to @inikep)
    • updated libdeflate to v1.25 (thanks to @tansy)
    • updated lzav to 5.8 (thanks to @avaneev)
    • updated lzlib to 1.16 (thanks to @inikep)
    • updated lzma to 26.01 (thanks to @inikep)
    • updated ppmd8 to 26.01 (thanks to @inikep)
    • updated quicklz to 1.5.1 beta 7 (thanks to @inikep)
    • updated slz to 1.2.2 (thanks to @inikep)
    • updated tamp to 2.2.4 (thanks to @tansy)
    • updated xz to 5.8.3 (thanks to @inikep)
    • updated zlib to 1.3.2 (thanks to @inikep)
    • updated zlib-ng to 2.3.3 (thanks to @inikep)
  3. v2.2lzbench v2.22025-10-28 · 2025-10-28 19:33 UTC
    查看更新说明

    Changes:

    • improvement: Automatic chunk size splitting for multi-threading (-T) when -b is not specified
    • improvement: Added the -I# option, which enables compression using # internal (built-in) threads when supported. Currently available for the following compressors: bsc, fast-lzma2, kanzi, lzham, lzma, xz, and zstd.
    • added zpaq v7.15 (thanks to @rsreds)
    • updated GLZA to v0.11.8 (thanks to @tansy)
    • updated bzip3 to v1.5.2 (thanks to @tansy)
    • updated libdeflate to v1.24 (thanks to @tansy)
    • updated snappy to v1.2.2 (thanks to @tansy)
    • updated xz to v5.8.1 (thanks to @tansy)
    • updated kanzi to 2.4.0 (thanks to @flanglet)
    • updated libbsc to v3.3.9 (thanks to @IlyaGrebnov) and later to v3.3.11 (thanks to @vectorsss)
    • updated density to v0.16.6 (Rust based) (thanks to @g1mv)
    • updated zlib-ng to 2.2.5
    • updated lzma and ppmd8 (no changes for ppmd8) to 25.01 (thanks to @tansy)
    • updated tamp to v1.10.0
  4. v2.1lzbench v2.12025-07-17 · 2025-07-17 16:42 UTC
    查看更新说明

    Changes:

    • Added the -T parameter, which enables multi-threaded compression using an external thread pool implemented in lzbench. The input data is split into N blocks (with block size specified by the -b option) and each block is compressed independently using T threads. Since the blocks are processed independently, this may slightly reduce the compression ratio. This option also significantly increases memory usage, as each compressor instance is allocated T times.
    • added bzip3 1.5.1
    • updated zstd to 1.5.7 (thanks to @tansy)
    • updated lzav 4.22 (thanks to @avaneev)
    • fixed: lzma 24.09 was using 2 threads for level 5 and higher (a bug introduced in v2.0)
    • removed max_block_size parameter and blosclz, shrinker, xpack codecs
    • removed pithy (issues with incompressible data), Nakamichi Okamigan
    • improvement: report compiler version (thanks to @danfe)
    • improvement: reorganization of lzbench directories
    • improvement: changed interface of compression and decompression functions (thanks to @tansy)
  5. v2.0.1lzbench v2.0.12025-02-11 · 2025-02-11 19:46 UTC
    查看更新说明

    Changes:

    • updated libbsc to v3.3.5 (thanks to @IlyaGrebnov)
    • fixed: set kanzi to use a single thread instead of half of available threads in lzbench v2.0 (thanks to @tansy)
    • fixed: Piping through tee doesn't work (issue #138)
    • improvement: Return exit code > 0 to shell in case of failure of one of codecs

用户点评

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

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

    README 原文

    未翻译

    Introduction

    lzbench is an in-memory benchmarking tool for open-source compressors. It integrates all compressors into a single executable. Initially, an input file is loaded into memory, after which each compressor is used to compress and decompress the file, ensuring the decompressed output matches the original. This method provides the advantage of compiling all compressors with the same compiler and optimizations. However, it requires access to the source code of each compressor, meaning e.g. Slug and lzturbo are not included.

    Status
    Build Status

    The list of changes in lzbench is available in the CHANGELOG.

    Contributor information can be found in CONTRIBUTING.md.

    Usage

    usage: lzbench [options] input [input2] [input3]
    
    For example:
      lzbench -ezstd filename = selects all levels of zstd
      lzbench -ebrotli,2,5/zstd filename = selects levels 2 & 5 of brotli and zstd
      lzbench -t3,5 fname = 3 sec compression and 5 sec decompression loops
      lzbench -t0,0 -i3,5 fname = 3 compression and 5 decompression iterations
      lzbench -o1c4 fname = output markdown format and sort by 4th column
      lzbench -ezlib -j -r dirname/ = test zlib on all files in directory, recursively
    

    For complete list of options refer to manual in doc directory which contains more detailed documentation.

    Building

    To compile, you need a C and C++ compiler that is GNUC-compatible, such as GCC, LLVM/Clang, or ICC. It is recommended to use GCC 7.1+ or Clang 6.0+.

    For Linux/MacOS/MinGW (Windows):

    make -j$(nproc)
    

    The default linking for Linux is dynamic and static for Windows. This can be changed with make BUILD_STATIC=0/1.

    For complete building instruction, with troubleshooting refer to BUILD.md.

    Supported compressors

    The table below lists the supported compressors. The Last update column is the release date of the bundled version. Compressors are built on every CI platform (Linux x86-64/x86-32/ARM64/ARM32/PPC64LE, macOS arm64, Windows MinGW) unless the Notes column says otherwise. Where lzbench carries local build fixes to a codec's sources, the Notes column says so.

    CompressorLast updateNotes
    aceapex 2.5.02026-10-28
    aocl-compression 5.3.22026-08-20Disabled by default; enable with make DONT_BUILD_AOCL=0. Linux x86-64 only — AMD-optimized lz4/lz4hc/lzma/bzip2/snappy/zlib/zstd (compression prefixed aocl-); requires GNU binutils (nm, objcopy); license: BSD 3-Clause / MIT / NCSA
    brieflz 1.3.02020-02-15
    brotli 1.2.02025-10-27
    bsc 3.3.122025-09-10Disabled on 32-bit ARM — multithreaded decompress faults (SIGBUS, lzbench#293)
    bzip2 1.0.82019-07-13
    bzip3 1.5.42026-09-07
    crush 1.02013-07-01
    density 0.16.62025-08-27Linux x86-64 and macOS only — requires the Rust toolchain (skipped for 32-bit, cross-compiled and Windows builds)
    fastlz 0.5.02020-02-02
    fast-lzma2 1.0.12019-05-06
    glza 0.122026-03-23
    go-brrr 1.3.02026-10-11Brotli in Go. Requires Go 1.22+. Skips 32-bit, cross and Windows builds. Uses lz+entropy/gobrrr/ffi/ffi.go for the C archive. Vendor copy omits tests, tools and golang.org/x/tools.
    gpucompact 1.12026-08-14CUDA only
    kanzi 2.6.02026-09-26
    lbzip2 2.6.52026-08-18bzip2 format; benchmarked single-threaded
    libdeflate v1.262026-08-22
    lizard v2.12025-01-26
    lz4/lz4hc/lz4frame v1.11.02026-11-04lz4frame: frame format, 4 MB independent blocks, multithreaded compression with -I#
    lzav 7.12026-11-04
    lzf 3.62014-03-13
    lzfse/lzvn 1.02017-03-08
    lzg 1.0.102018-11-29
    lzham 1.02020-09-15Public domain since 2020-09-15. Build fixed in lzbench for MinGW and newer compilers (<cstdint> includes, GetSystemInfo, DISABLE_THREADING). Disabled on macOS and 32-bit x86 — 64 MB dictionary overflows the 32-bit address space
    lzjb 20102010
    lzlib 1.162026-03-11
    lzma v26.032026-09-03
    lzo 2.102017-03-01
    lzsse 2019-04-18 (1847c3e827)2019-04-1864-bit x86 only — requires SSE4.1 (Windows: MinGW-w64 only); lzsse8fast has a bug
    mbrotli 0.5.202026-11-01Requires the Rust toolchain 1.89+ (skipped for 32-bit, cross-compiled and Windows builds). Built through the mbrotli-ffi C ABI; manifests trimmed in lzbench (no dev-dependencies, rlib only)
    memlz 0.5 beta2026-09-24Patched in lzbench: SSE4.2 target attribute also applied for MinGW (memlz.h)
    misa77 0.6.02026-07-30Little-endian 64-bit only — needs a C++20 compiler (GCC 10+, Clang 12+); skipped automatically
    mzstd 0.2.112026-11-03Requires the Rust toolchain 1.89+ (skipped for 32-bit, cross-compiled and Windows builds). Built through the mzstd-ffi C ABI; manifests trimmed in lzbench (no dev-dependencies, rlib only)
    nvcomp 2.2.02022-02-07CUDA only — built with make ENABLE_CUDA=1; not in the default CI matrix
    openzl 0.2.32026-07-2864-bit only — upstream does not support 32-bit builds
    ppmd8 26.032026-09-03
    pulsar 2.5.02026-09-02GPL-3; Rust 1.85+, skipped for 32-bit, cross-compiled and Windows builds. Patched in lzbench: src/lib.rs has a framed C ABI whose encoder does not re-decode candidates to verify them; src/bin not vendored
    quicklz 1.5.1 beta 72011-10-07
    skim 0.1.02026-06-07Linux x86-64 and macOS only — requires the Zig compiler
    slz 1.4-dev32026-10-25Emits a gzip/deflate-compatible stream
    snappy 1.3.12026-09-18
    tamp 2.3.02026-07-09
    tornado 0.6a2014-03-08Disabled on RISC-V unless the build machine does misaligned access at full speed (asked via the hwprobe syscall); such a build is then not portable to a slower RISC-V machine
    ucl 1.032004-07-20
    wlz4/wlz4hc 1.3.0, wzip 1.3.02026-10-26
    xz 5.8.42026-09-09Built in lzbench with a hand-written config.h (upstream uses autotools)
    yalz77 2022-07-062022-07-06
    zlib 1.3.22026-02-17
    zlib-ng 2.3.32026-02-03
    zlib-turbo 1.1.02026-10-25Built with Z_PREFIX; levels 1-9 give zlib 1.3.2's output, also with -I#
    zling 2018-10-122018-10-12Build fixed in lzbench (missing <functional> include). Disabled on big-endian PowerPC; not recommended for production use (per author)
    zpaq 7.152016-08-17Slower on non-x86 — built with -DNOJIT (x86-only JIT, portable interpreter elsewhere)
    zstd 1.5.72025-02-19
    zxc 0.15.02026-10-13

    Warning: The compressors listed below have security issues and/or are no longer maintained.

    CompressorLast updateNotes
    csc 2016-10-132016-10-13Build fixed in lzbench (SSE intrinsics header, 7-Zip type guards). Disabled on macOS — segfaults with Apple LLVM 7.3.0 (clang-703.0.31)
    gipfeli 2016-07-132016-07-13Decompression file mismatch when compiled with GCC 14.2 using -O3
    lzmat 1.01 v1.02008-07-08Build fixed in lzbench for 64-bit (pointer arithmetic truncated through MP_U32). Decompression bugs; may segfault with GCC 4.9+ using -O3
    lzrw 15-Jul-19911991-07-15May segfault with GCC 4.9+ using -O3
    wflz 2015-09-162015-09-16May segfault with GCC 4.9+ using -O3
    yappy 2014-03-222014-03-22Disabled on big-endian PowerPC; segfault with GCC 13.3.0 on 32-bit ARM (arm-linux-gnueabi)

    Benchmarks

    The following results were obtained using lzbench 2.4 (the lzbench24_x86_64-linux-gnu-gcc15 release binary, built with gcc 15.2.0) and executed with the options -eALL -t8,8 -o1c4. The tests were run on a single thread of an AMD EPYC 9555P processor at 3.20 GHz, with the CPU governor set to performance and turbo boost disabled for stability. The operating system was Ubuntu 26.04, and the benchmark made use of silesia.tar, which contains tarred files from the Silesia compression corpus.

    The results sorted by ratio are available here. An interactive version of the single- and multi-threaded results can be sorted and searched, and charts compression ratio against speed with the Pareto frontier.

    lzbench 2.4 results: compression ratio against compression and decompression speed, with the Pareto frontier. Click for the interactive version.

    Compressor nameCompressionDecompress.Compr. sizeRatio
    memcpy24075 MB/s24002 MB/s211947520100.00
    aceapex 1.0.1 -155.9 MB/s675 MB/s6855676032.35
    aceapex 1.0.1 -239.2 MB/s679 MB/s6821330332.18
    brieflz 1.3.0 -1192 MB/s293 MB/s8113880338.28
    brieflz 1.3.0 -3124 MB/s301 MB/s7555073635.65
    brieflz 1.3.0 -622.8 MB/s328 MB/s6720842031.71
    brieflz 1.3.0 -83.02 MB/s355 MB/s6453171830.45
    brotli 1.2.0 -0341 MB/s322 MB/s7843329837.01
    brotli 1.2.0 -2139 MB/s378 MB/s6806948932.12
    brotli 1.2.0 -553.3 MB/s419 MB/s5955544928.10
    brotli 1.2.0 -812.6 MB/s443 MB/s5714830426.96
    brotli 1.2.0 -110.56 MB/s383 MB/s5040779523.78
    bsc 3.3.12 -m0 -e119.4 MB/s25.0 MB/s4929520823.26
    bsc 3.3.12 -m4 -e128.8 MB/s15.8 MB/s5068950823.92
    bsc 3.3.12 -m5 -e126.9 MB/s14.7 MB/s4960909623.41
    bzip2 1.0.8 -113.5 MB/s41.1 MB/s6048481328.54
    bzip2 1.0.8 -513.2 MB/s37.3 MB/s5572439526.29
    bzip2 1.0.8 -912.7 MB/s35.5 MB/s5457281125.75
    bzip3 1.5.4 -111.9 MB/s13.9 MB/s5032569523.74
    bzip3 1.5.4 -511.9 MB/s12.4 MB/s4723683622.29
    bzip3 1.5.4 -911.3 MB/s10.4 MB/s4875397223.00
    crush 1.0 -061.0 MB/s316 MB/s7306460334.47
    crush 1.0 -21.11 MB/s372 MB/s6374622330.08
    density 0.16.6 -11630 MB/s1617 MB/s13304215062.77
    density 0.16.6 -2767 MB/s758 MB/s10161392847.94
    density 0.16.6 -3442 MB/s578 MB/s9231401043.56
    fastlz 0.5.0 -1273 MB/s587 MB/s10462808449.37
    fastlz 0.5.0 -2294 MB/s561 MB/s10090607247.61
    fastlzma2 1.0.1 -121.8 MB/s65.0 MB/s5903095027.85
    fastlzma2 1.0.1 -312.1 MB/s69.9 MB/s5402383325.49
    fastlzma2 1.0.1 -58.08 MB/s75.7 MB/s5120956724.16
    fastlzma2 1.0.1 -84.52 MB/s78.5 MB/s4912673623.18
    fastlzma2 1.0.1 -103.38 MB/s79.1 MB/s4866606122.96
    kanzi 2.5.3 -1196 MB/s1112 MB/s7934308937.44
    kanzi 2.5.3 -2202 MB/s666 MB/s6863027932.38
    kanzi 2.5.3 -399.0 MB/s338 MB/s6442718930.40
    kanzi 2.5.3 -445.0 MB/s168 MB/s6036574628.48
    kanzi 2.5.3 -519.6 MB/s53.2 MB/s5401678825.49
    kanzi 2.5.3 -615.0 MB/s31.2 MB/s4951755123.36
    kanzi 2.5.3 -710.8 MB/s15.8 MB/s4730816022.32
    kanzi 2.5.3 -83.45 MB/s3.39 MB/s4325037720.41
    kanzi 2.5.3 -92.48 MB/s2.44 MB/s4180925419.73
    lbzip2 2.6.5 -122.0 MB/s62.7 MB/s6037317028.48
    lbzip2 2.6.5 -522.8 MB/s51.0 MB/s5568254326.27
    lbzip2 2.6.5 -922.4 MB/s47.0 MB/s5457063125.75
    libdeflate 1.26 -1202 MB/s783 MB/s7350279134.68
    libdeflate 1.26 -3133 MB/s811 MB/s7017081633.11
    libdeflate 1.26 -682.1 MB/s820 MB/s6751061531.85
    libdeflate 1.26 -930.6 MB/s805 MB/s6671575131.48
    libdeflate 1.26 -124.73 MB/s832 MB/s6467872330.52
    lizard 2.1 -10464 MB/s1911 MB/s10340297148.79
    lizard 2.1 -12165 MB/s1772 MB/s8623242240.69
    lizard 2.1 -1576.3 MB/s1860 MB/s8118733038.31
    lizard 2.1 -194.07 MB/s1821 MB/s7741640036.53
    lizard 2.1 -20367 MB/s1300 MB/s9692420445.73
    lizard 2.1 -22154 MB/s1383 MB/s8486672540.04
    lizard 2.1 -2523.2 MB/s1409 MB/s7513128635.45
    lizard 2.1 -292.08 MB/s1470 MB/s6869422732.41
    lizard 2.1 -30356 MB/s1154 MB/s8572742940.45
    lizard 2.1 -32158 MB/s1218 MB/s7865265437.11
    lizard 2.1 -3582.6 MB/s1473 MB/s7456358335.18
    lizard 2.1 -393.96 MB/s1420 MB/s6980752232.94
    lizard 2.1 -40284 MB/s974 MB/s8084304938.14
    lizard 2.1 -42137 MB/s1067 MB/s7335098834.61
    lizard 2.1 -4522.5 MB/s1147 MB/s6667665331.46
    lizard 2.1 -491.99 MB/s1058 MB/s6067921528.63
    lz4 1.10.0 --fast -17924 MB/s3977 MB/s13173280262.15
    lz4 1.10.0 --fast -9762 MB/s3827 MB/s12013079656.68
    lz4 1.10.0 --fast -3620 MB/s3783 MB/s10706619050.52
    lz4 1.10.0550 MB/s3832 MB/s10088080047.60
    lz4hc 1.10.0 -1259 MB/s3382 MB/s8913542942.06
    lz4hc 1.10.0 -471.0 MB/s3587 MB/s7980790937.65
    lz4hc 1.10.0 -931.9 MB/s3703 MB/s7788444836.75
    lz4hc 1.10.0 -1210.4 MB/s3813 MB/s7726262036.45
    lzav 5.17 -1451 MB/s2527 MB/s8457791139.91
    lzav 5.17 -242.8 MB/s2454 MB/s7386939534.85
    lzf 3.6 -0318 MB/s530 MB/s10568208849.86
    lzf 3.6 -1313 MB/s548 MB/s10204109248.14
    lzfse 2017-03-0891.1 MB/s732 MB/s6762428131.91
    lzg 1.0.10 -189.4 MB/s477 MB/s10855366751.22
    lzg 1.0.10 -450.3 MB/s477 MB/s9593055145.26
    lzg 1.0.10 -631.2 MB/s506 MB/s8949022042.22
    lzg 1.0.10 -89.92 MB/s555 MB/s8360690139.45
    lzham 1.0 -d26 -011.1 MB/s200 MB/s6408987030.24
    lzham 1.0 -d26 -13.16 MB/s273 MB/s5474058925.83
    lzjb 2010284 MB/s380 MB/s12267161357.88
    lzlib 1.16 -031.7 MB/s50.4 MB/s6384738630.12
    lzlib 1.16 -38.32 MB/s58.4 MB/s5632067426.57
    lzlib 1.16 -63.07 MB/s63.9 MB/s4977749523.49
    lzlib 1.16 -91.81 MB/s65.3 MB/s4829688922.79
    lzma 26.03 -029.5 MB/s62.3 MB/s6052084428.55
    lzma 26.03 -223.0 MB/s70.2 MB/s5708244326.93
    lzma 26.03 -413.6 MB/s73.7 MB/s5593606426.39
    lzma 26.03 -63.13 MB/s78.4 MB/s4955105923.38
    lzma 26.03 -92.55 MB/s78.2 MB/s4868248222.97
    lzo1 2.10 -1228 MB/s579 MB/s10647451950.24
    lzo1 2.10 -9997.8 MB/s609 MB/s9494612944.80
    lzo1a 2.10 -1218 MB/s611 MB/s10420225149.16
    lzo1a 2.10 -99104 MB/s634 MB/s9266626543.72
    lzo1b 2.10 -1186 MB/s567 MB/s9703608745.78
    lzo1b 2.10 -3192 MB/s579 MB/s9404457844.37
    lzo1b 2.10 -6187 MB/s584 MB/s9138235543.12
    lzo1b 2.10 -9146 MB/s578 MB/s8926188442.12
    lzo1b 2.10 -99104 MB/s587 MB/s8565337640.41
    lzo1b 2.10 -99914.2 MB/s665 MB/s7659429236.14
    lzo1c 2.10 -1200 MB/s516 MB/s9955090446.97
    lzo1c 2.10 -3201 MB/s526 MB/s9671615345.63
    lzo1c 2.10 -6171 MB/s521 MB/s9330362344.02
    lzo1c 2.10 -9138 MB/s519 MB/s9104038642.95
    lzo1c 2.10 -99103 MB/s524 MB/s8811228841.57
    lzo1c 2.10 -99920.8 MB/s560 MB/s8039674137.93
    lzo1f 2.10 -1184 MB/s568 MB/s9974332947.06
    lzo1f 2.10 -99918.8 MB/s584 MB/s8089020638.17
    lzo1x 2.10 -1500 MB/s561 MB/s10057253747.45
    lzo1x 2.10 -11538 MB/s570 MB/s10660462950.30
    lzo1x 2.10 -12520 MB/s559 MB/s10323885948.71
    lzo1x 2.10 -15515 MB/s557 MB/s10146209447.87
    lzo1x 2.10 -9997.40 MB/s531 MB/s7530190335.53
    lzo1y 2.10 -1502 MB/s573 MB/s10125831847.78
    lzo1y 2.10 -9997.31 MB/s532 MB/s7550384935.62
    lzo1z 2.10 -9997.21 MB/s525 MB/s7506133135.42
    lzo2a 2.10 -99923.0 MB/s471 MB/s8280933739.07
    lzsse2 2019-04-18 -119.6 MB/s3385 MB/s8797609541.51
    lzsse2 2019-04-18 -68.27 MB/s3850 MB/s7583710135.78
    lzsse2 2019-04-18 -128.08 MB/s3850 MB/s7582997335.78
    lzsse2 2019-04-18 -168.16 MB/s3852 MB/s7582997335.78
    lzsse4 2019-04-18 -119.3 MB/s4345 MB/s8254210638.94
    lzsse4 2019-04-18 -69.39 MB/s4714 MB/s7611829835.91
    lzsse4 2019-04-18 -129.24 MB/s4715 MB/s7611301735.91
    lzsse4 2019-04-18 -169.19 MB/s4715 MB/s7611301735.91
    lzsse4fast 2019-04-18266 MB/s3673 MB/s9591768145.26
    lzsse8 2019-04-18 -117.6 MB/s4620 MB/s8186624538.63
    lzsse8 2019-04-18 -69.02 MB/s5007 MB/s7546971735.61
    lzsse8 2019-04-18 -128.84 MB/s5014 MB/s7546433935.61
    lzsse8 2019-04-18 -168.88 MB/s5019 MB/s7546433935.61
    lzvn 2017-03-0869.0 MB/s799 MB/s8081460938.13
    mbrotli 0.5.2 -0341 MB/s291 MB/s7843329837.01
    mbrotli 0.5.2 -2127 MB/s349 MB/s6806948932.12
    mbrotli 0.5.2 -550.0 MB/s388 MB/s5955544928.10
    mbrotli 0.5.2 -814.4 MB/s419 MB/s5714830426.96
    mbrotli 0.5.2 -110.67 MB/s371 MB/s5041024223.78
    memlz 0.5 beta4452 MB/s2039 MB/s12695724359.90
    misa77 0.6.0 --1336 MB/s5491 MB/s9907419246.74
    misa77 0.6.0 -0250 MB/s6821 MB/s9452645444.60
    misa77 0.6.0 -173.8 MB/s7813 MB/s9038542842.65
    misa77 0.6.0 -256.1 MB/s6683 MB/s8547670540.33
    misa77 0.6.0 -314.4 MB/s6470 MB/s8002864637.76
    misa77 0.6.0 -410.1 MB/s5177 MB/s7525930935.51
    misa77 0.6.0 safe --1337 MB/s5444 MB/s9907419246.74
    misa77 0.6.0 safe -0250 MB/s6730 MB/s9452645444.60
    misa77 0.6.0 safe -174.1 MB/s7694 MB/s9038542842.65
    misa77 0.6.0 safe -256.0 MB/s6588 MB/s8547670540.33
    misa77 0.6.0 safe -314.5 MB/s6391 MB/s8002864637.76
    ppmd8 26.03 -115.7 MB/s14.0 MB/s5580329526.33
    ppmd8 26.03 -412.8 MB/s11.5 MB/s5124193224.18
    ppmd8 26.03 -92.61 MB/s2.55 MB/s4820776322.75
    pulsar 2.5.01.66 MB/s21.2 MB/s5581690926.34
    quicklz 1.5.1 beta 7 -1463 MB/s542 MB/s9472056244.69
    quicklz 1.5.1 beta 7 -2202 MB/s546 MB/s8455562739.89
    quicklz 1.5.1 beta 7 -356.1 MB/s761 MB/s8182224138.60
    skim 0.1.02313 MB/s3500 MB/s13676463464.53
    slz_gzip 1.3.1 -1316 MB/s329 MB/s9954975746.97
    slz_gzip 1.3.1 -2307 MB/s332 MB/s9679406845.67
    slz_gzip 1.3.1 -3299 MB/s330 MB/s9608574645.33
    snappy 1.3.1457 MB/s976 MB/s10141544347.85
    tamp 2.3.0 -824.3 MB/s170 MB/s11486320254.19
    tamp 2.3.0 -124.50 MB/s185 MB/s9555954945.09
    tamp 2.3.0 -150.87 MB/s202 MB/s9064519642.77
    tornado 0.6a -1353 MB/s424 MB/s10738184650.66
    tornado 0.6a -645.9 MB/s215 MB/s6236458329.42
    tornado 0.6a -1114.7 MB/s224 MB/s5892998727.80
    tornado 0.6a -162.32 MB/s247 MB/s5325704625.13
    ucl_nrv2b 1.03 -150.0 MB/s267 MB/s8170316838.55
    ucl_nrv2b 1.03 -619.9 MB/s306 MB/s7390218534.87
    ucl_nrv2b 1.03 -92.38 MB/s333 MB/s7103119533.51
    ucl_nrv2d 1.03 -151.4 MB/s277 MB/s8146197638.43
    ucl_nrv2d 1.03 -619.8 MB/s316 MB/s7375767334.80
    ucl_nrv2d 1.03 -92.39 MB/s348 MB/s7005389533.05
    ucl_nrv2e 1.03 -151.1 MB/s268 MB/s8119556038.31
    ucl_nrv2e 1.03 -619.7 MB/s310 MB/s7330201234.58
    ucl_nrv2e 1.03 -92.40 MB/s337 MB/s6964513432.86
    xz 5.8.4 -119.2 MB/s105 MB/s5880567627.75
    xz 5.8.4 -39.80 MB/s116 MB/s5597222426.41
    xz 5.8.4 -53.84 MB/s121 MB/s5022875223.70
    xz 5.8.4 -73.01 MB/s124 MB/s4906343623.15
    xz 5.8.4 -92.75 MB/s122 MB/s4876653223.01
    yalz77 2022-07-06 -1118 MB/s513 MB/s9395272844.33
    yalz77 2022-07-06 -651.9 MB/s528 MB/s8603183240.59
    yalz77 2022-07-06 -1234.9 MB/s535 MB/s8405062539.66
    zlib 1.3.2 -189.0 MB/s297 MB/s7725902936.45
    zlib 1.3.2 -626.8 MB/s314 MB/s6822843132.19
    zlib 1.3.2 -911.3 MB/s318 MB/s6764454831.92
    zlib-ng 2.3.3 -1196 MB/s466 MB/s9412704744.41
    zlib-ng 2.3.3 -662.1 MB/s498 MB/s6891407132.51
    zlib-ng 2.3.3 -925.4 MB/s506 MB/s6758206031.89
    zling 2018-10-12 -086.1 MB/s183 MB/s6299059029.72
    zling 2018-10-12 -269.4 MB/s189 MB/s6150309329.02
    zling 2018-10-12 -451.9 MB/s192 MB/s6062676828.60
    zpaq 7.15 -130.5 MB/s88.8 MB/s6978904032.93
    zpaq 7.15 -50.49 MB/s0.48 MB/s4047020219.09
    zstd 1.5.7 --fast --5563 MB/s1949 MB/s10302335948.61
    zstd 1.5.7 --fast --3509 MB/s1803 MB/s9460214444.63
    zstd 1.5.7 --fast --1453 MB/s1707 MB/s8691629441.01
    zstd 1.5.7 -1411 MB/s1351 MB/s7319370434.53
    zstd 1.5.7 -2352 MB/s1257 MB/s6930979732.70
    zstd 1.5.7 -5126 MB/s1172 MB/s6274085229.60
    zstd 1.5.7 -861.8 MB/s1301 MB/s5969982428.17
    zstd 1.5.7 -1136.1 MB/s1320 MB/s5796323027.35
    zstd 1.5.7 -159.39 MB/s1345 MB/s5686749426.83
    zstd 1.5.7 -184.13 MB/s1175 MB/s5328894825.14
    zstd 1.5.7 -221.99 MB/s1087 MB/s5228429024.67
    zxc 0.14.1 -1614 MB/s8151 MB/s13089629161.76
    zxc 0.14.1 -3168 MB/s4716 MB/s9769714546.09
    zxc 0.14.1 -69.04 MB/s3938 MB/s7690056336.28

    Multi-threaded benchmarks

    The same binary and machine, with lzbench's thread pool: -eMAINSTREAM -b4096 -T# with -t8,8 -o4, run with 1, 8 and 32 threads and pinned to cores 0 to #-1 with taskset. The input is split into 4 MB blocks that are compressed independently, so the ratios are slightly lower than in the single-threaded table above, and the same for every thread count. Speeds are in MB/s; memcpy shows the memory bandwidth available to that many cores. silesia.tar makes 51 blocks, so 32 threads need two rounds and can be at most about 25 times faster than one.

    Compressor nameRatioCompr. T1Compr. T8Compr. T32Decompr. T1Decompr. T8Decompr. T32
    memcpy100.002436037658100596243743790799945
    bzip2 1.0.8 -128.5613.490.532341.2291855
    bzip2 1.0.8 -925.7912.591.930135.2253746
    lz4 1.10.0 --fast -1762.2189564961988938002727581612
    lz4 1.10.0 --fast -956.7274154111618835882579777147
    lz4 1.10.0 --fast -553.0265146921414633692492573564
    lz4 1.10.047.6253739151167133902621277376
    lz4hc 1.10.0 -142.092431542452029932188170643
    lz4hc 1.10.0 -338.4382.7524142331862284867366
    lz4hc 1.10.0 -936.8030.922472232332292069716
    lzma 26.03 -028.6028.719153261.43791022
    lzma 26.03 -426.9122.081.025469.24641194
    lzma 26.03 -924.033.7521.969.373.24251075
    ppmd8 26.03 -424.2312.974.021211.672.6187
    zlib 1.3.2 -136.4686.2587160729120475971
    zlib 1.3.2 -632.2126.419761330721225807
    zlib 1.3.2 -931.9411.277.629931119945835
    zstd 1.5.7 --fast --548.6953338961117718701363741006
    zstd 1.5.7 --fast --344.7049035931025217051153739613
    zstd 1.5.7 --fast --141.054272829908016131229837663
    zstd 1.5.7 -134.58400303986721303936731226
    zstd 1.5.7 -331.37240152446271151836423142
    zstd 1.5.7 -728.7580.147216451222837622130
    zstd 1.5.7 -1227.9335.21865911268775821532
    zstd 1.5.7 -1726.396.3832.71051138730720797
    zstd 1.5.7 -2225.883.0118.259.61103730019522