Skip to content

ZXC v0.13.0

Latest

Choose a tag to compare

@hellobertrand hellobertrand released this 14 Jul 07:51
c1c9a9a

Release Notes

This release introduces ZXC format v7 and a new Level 7 (ULTRA) compression tier (Huffman-coded literals and sequence tokens over the new PivCo SIMD-decodable bitstream layout), that pushes the ratio past zstd -1 while still decoding roughly 2x faster than it. The entropy-decode path was reworked for a +5-13 % Level 6 decode speedup across every reference CPU, and decompression can now run in-place in a single buffer. The container format advances to v7; the shared-library ABI is unchanged (libzxc.so.4).

v0.13 is the last milestone before v1.0, which will lock the container format and guarantee format stability and backward compatibility going forward.

⚠️Breaking change (format). The container format is now v7. v0.13.0 writes v7 archives that v0.12.0 and earlier decoders reject, and it cannot read v6/v5 archives: the header version byte is checked for exact equality (ZXC_ERROR_BAD_VERSION). The shared-library ABI is unchanged (soname stays libzxc.so.4), so no re-link is required, but note that upgrading the library alone makes newly written archives v7.

Migrating v6 → v7 archives is a one-time transcode — decompress with your old (v6) build and recompress with the new one:

zxc-v6 -dc old.zxc | zxc-v7 -z -c > new.zxc

Keep a v6 build around until your data at rest is converted. Full guide (bulk migration, dictionaries, verification):
docs/MIGRATION.md.

Road to v1.0. This is the last planned format break. v0.13 is the final milestone before v1.0, which will freeze the ZXC container format and guarantee format stability and backward compatibility from then on. If you're deciding when to standardize your data at rest, v1.0 is the line to wait for.

New Features

Level 7 (ULTRA) Maximum Density

A new top compression level for storage and bandwidth-bound, write-once / read-many workloads. On top of Level 6's Huffman-coded literals, Level 7 additionally Huffman-codes the sequence-token stream (length-limited canonical codes up to 11 bits) and runs a deeper optimal parse selected by a space-speed Lagrangian (J = size + λ · decoded_bytes).

  • On the Silesia corpus it reaches a 33.00 % ratio : 9 % denser than Level 6 (36.27 %) and denser than zstd -1 (34.53 %), while still decoding 2x faster than zstd -1. It fills the gap between lz4hc's speed and zstd's density. (#315)
  • Exposed as -7 / ZXC_LEVEL_ULTRA in the CLI and library, and across Go, Rust, Python, Node.js, and WASM. (#317)

Pivot-Coded Huffman Bitstream (format v7)

Huffman-coded sections now place their bits on the wire in the PivCo level-ordered layout: the same length-limited canonical Huffman code, but the bits are transposed by tree level into per-node branch bitmaps so the decoder runs data-parallel SIMD list merges instead of a serial bit chain. This is the source of the Level 6 decode speedup and what makes Level 7's token coding practical. (#315)

In-Place Decompression

Decompression can now run in a single buffer: the compressed input sits flush-right and is decoded left-to-right within the same allocation; for lower peak memory in tightly-budgeted integrations. (#315)

CLI: Progress, Robust Parsing, and File I/O

The zxc CLI gains a progress indicator, more robust argument parsing, and hardened file-I/O handling. (#318) A new CLI install option (incl. winget on Windows) is documented in the README. (#316)

Performance & Memory

Measured versus v0.12.0 (Silesia, single-thread):

  • Level 6 decode: +5% to +13% faster on every reference CPU: Apple M2 +6%, Google Axion / Neoverse-V2 +6%, AMD EPYC Zen 5 +13%, AMD EPYC Zen 3 +5%, from the reworked PivCo Huffman decoder.
  • New Level 7 (ULTRA): 33.00% ratio : +9% denser than Level 6, denser than zstd -1, and decoding ~2x faster than it.
  • Ratio at Levels 1-6 is unchanged (Levels 1-5 are byte-identical to v0.12.0).
  • Reworked Huffman decoder and refined compression margins across the entropy path. (#301, #319)
  • Space-speed Lagrangian selection at ULTRA trades ratio against decode cost per block. (#315)
  • Cached dictionary Huffman tree: the dictionary's shared literal table is decoded into its ready-to-use tree once, at attach time, instead of per block: a large small-block dictionary-decode speedup. (#320)
  • Robustness and memory-management refinements across the library. (#321)

Bug Fixes & Robustness

  • Improved robustness and memory management across compression and decompression. (#321)
  • Refined LZ77 search-loop conditions and general hardening across components. (#296, #298)
  • Type-safety and modernization passes over the JS and Go wrappers. (#297)

Development & CI

  • OS & libc compatibility CI for musl / Alpine Linux and FreeBSD, validating the freestanding core beyond glibc. (#291)
  • ABI-check accuracy improved and the libabigail baseline updated for 0.13.0: opaque-handle layout changes are now correctly recognised as ABI-compatible (no soname bump).
  • Refined code-coverage reporting with vendored code excluded. (#322)
  • Meson project version and SOVERSION are now statically defined. (#290)
  • Benchmark tooling updated to lzbench 2.3 with the ZXC 0.13.0 codec.

Documentation

  • README: refreshed Silesia benchmarks (lzbench 2.3) across Apple M2, Google Axion (Neoverse-V2), AMD EPYC 9B45 (Zen 5) and 7B13 (Zen 3), plus a new Ultra (Level 7 vs zstd -1) comparison tier.
  • MIGRATION: v6 -> v7 transcode guide.
  • API / FORMAT / man page: Level 7 (ZXC_LEVEL_ULTRA), the PivCo layout, and the v7 header documented.

Acknowledgements

ZXC's new v7 Huffman bitstream is built on PivCo-Huffman. Sincere thanks to @MarcinZukowski for the technique and its paper, and to @rygorous whose breakdown of the PivCo merge operations made the SIMD decoder practical.

Thanks also to @inikep (lzbench) and @powturbo (TurboBench) for keeping ZXC in the independent benchmark suites, to @guglovich for packaging ZXC for the Arch Linux AUR, and to @jeanga for continued testing and packaging help.

Changelog

  • api: Refines code coverage reporting (#322)
  • api: Adds Level 7 (Ultra) compression to wrappers (#317)
  • api: ZXC format v7: PivCo Huffman, level 7 (ULTRA), space-speed selection, in-place decode (#315)
  • api: bump node-addon-api from 8.8.0 to 8.9.0 in /wrappers/nodejs (#308)
  • api: Refines documentation and API option descriptions (#299)
  • api: Enhances code quality and analysis setup (#294)
  • perf: Optimizes compression and decompression performance (#319)
  • perf: Optimizes Huffman decoding and compression margins (#301)
  • cli: Refines CLI with progress, robust parsing, and file I/O (#318)
  • cli: Update README with zxc CLI installation option (#316)
  • cli: Enhances code quality and robustness across components (#296)
  • cli: Enhance README clarity and quick start
  • build: bump pytest from 9.0.3 to 9.1.1 in /wrappers/python (#310)
  • build: bump setuptools-scm in /wrappers/python (#311)
  • build: bump cibuildwheel from 3.4.1 to 4.1.0 in /wrappers/python (#309)
  • build: bump vitest from 4.1.7 to 4.1.9 in /wrappers/nodejs (#307)
  • build: Refines code style, type safety, and modernizes JS/Go wrappers (#297)
  • build: Refines CI/CD workflows and test stability (#292)
  • portability: Add OS and libc compatibility CI for musl Linux and FreeBSD (#291)
  • doc: Refactor LZ77 search loop conditions (#298)
  • doc: Update README badges
  • misc: Ignore vendors code in coverage reports
  • misc: Improves robustness and refines memory management (#321)
  • misc: Update lzbench benchmark source to v0.13.0
  • misc: Caches dict Huffman tree upon attach (#320)
  • misc: bump actions/setup-python from 6.2.0 to 6.3.0 (#305)
  • misc: bump oss-fuzz-base/base-builder in /.clusterfuzzlite (#312)
  • misc: bump msys2/setup-msys2 from 2.31.1 to 2.32.0 (#304)
  • misc: bump actions-rust-lang/setup-rust-toolchain (#306)
  • misc: bump actions/attest-build-provenance from 4.1.0 to 4.1.1 (#303)
  • misc: bump softprops/action-gh-release from 3.0.0 to 3.0.1 (#302)
  • misc: Refines code quality and addresses warnings (#295)
  • misc: Update bash conditional expressions to '[[ ... ]]' (#293)
  • misc: Statically define Meson project version and SOVERSION (#290)

Full Changelog: v0.12.0...v0.13.0