Release Notes
v1.0.2 is a maintenance release of the Hydrogen series, aimed at packagers and embedders: two CMake fixes, a Nix flake, and two build options that trim the library for size-sensitive static links.
Drop-in for v1.0.1. Same format v9, same API and ABI, soname still libzxc.so.6. No symbol added, removed or changed. A default build behaves as v1.0.1, and archives written by any 1.0.x release decode with any other.
Build fixes
- The exported CMake target follows
CMAKE_INSTALL_INCLUDEDIR(#639). Its include path was hard-coded toinclude, sofind_package(zxc)named a directory that did not exist when the headers were installed elsewhere, as with a splitdevoutput. The path now comes fromCMAKE_INSTALL_INCLUDEDIR. -march=nativeis probed before use (#640). GCC rejects the flag on RISC-V and POWER, which failed the build withZXC_NATIVE_ARCHon. CMake now tests it, and when the compiler refuses it, reports so and builds without.
Trimming the library (#641, #643)
By default the codec is built once per SIMD tier of the target and the tier is selected at run time. Each tier is a full copy of the codec, which a small static link may not want. Two new options trade those copies away; left at their defaults, they change nothing. Neither changes the format or the API.
ZXC_SIMD_VARIANTS
| Encoder | LZ decoder | Entropy decoder (levels 6-7) |
|---|---|---|---|
all (default)
| every tier | every tier | every tier |
decoder
| baseline | baseline, AVX2 / NEON | baseline, AVX2 / NEON |
minimal
| baseline | baseline | baseline, AVX2 / NEON |
ZXC_SIMD_VARIANTSselects the tiers to build. The baseline keeps its intrinsics (SSE2 on x86-64, NEON on AArch64), unlikeZXC_DISABLE_SIMD. Without an AVX-512 variant, AVX-512 processors run the AVX2 one. Every such build reads what any other build wrote.ZXC_ENABLE_DICT=OFFremoves dictionary support. This one changes what the library accepts: attaching a dictionary, or reading an archive written with one, returnsZXC_ERROR_DICT_UNSUPPORTED.
# Small static library without dictionary support
cmake -B build -DZXC_SIMD_VARIANTS=minimal -DZXC_ENABLE_DICT=OFFMeson has the same switches, -Dsimd_variants= and -Ddict=. Details: docs/INSTALL.md.
Packaging
- Nix flake (#638). The repository carries a
flake.nixand apackage.nix:nix build github:hellobertrand/zxcbuilds the library, the CLI and the man pages, runs the tests, andnix runstartszxc. CI checks the flake on Linux and macOS. Contributed by @kleindotc. - CI builds the trimmed configurations, with and without dictionary support (#641, #643, #646).
Changelog
- api: Adds ZXC_BUILD_SIMD_VARIANTS and ZXC_ENABLE_DICT build trim options (#641, #643, #646)
- api: Nix support and CI nix job. (#638)
- fix: Probe -march=native support (#640)
- fix: Guard shared helpers in trimmed builds (#652)
- fix: Install include dir from CMAKE_INSTALL_INCLUDEDIR (#639)
Full Changelog: v1.0.1...v1.0.2