github hellobertrand/zxc v0.5.0
ZXC v0.5.0

latest releases: v0.10.0, v0.9.1, v0.9.0...
3 months ago

Release Notes

Version 0.5.0 is bringing major architectural improvements that significantly enhance both compression ratio and decompression speed.

Breaking Changes

New Block Format: GHI (High-Velocity)

  • Introduced GHI (General High-Velocity) block format optimized for maximum decompression speed
  • Renamed GNR to GLO (General Low-Velocity) for clarity
  • GHI uses packed 32-bit sequences for cache-friendly sequential access

Multi-Algorithm Checksum Support

  • Implemented flexible checksum architecture supporting multiple algorithms
  • Replaced xxHash with rapidhash as default checksum algorithm
  • rapidhash provides better performance
  • Incremented file format version to support new checksum system

Implements runtime CPU feature dispatch

Adds runtime CPU feature detection and dispatches optimized functions for compression and decompression based on available CPU features (AVX2, AVX512, NEON).
Removes the need for separate AVX2/AVX512 build targets, simplifying the build process and enabling dynamic selection of the most efficient implementation at runtime.

Performance Improvements

Decompression Speed

  • Apple Silicon (M2): Level -1 improved by +26% (8,873 → 11,179 MB/s)
  • Google Axion (ARM): Level -1 improved by +21% (6,712 → 8,103 MB/s)
  • x86_64 (AMD EPYC): Level -1 improved by +21% (5,060 → 6,129 MB/s)

Compression Efficiency

  • Improved LZ77 match finding with branchless logic
  • Optimized compression parameters for better ratios
  • Level -2 ratio improved from 58.92% to 54.75%
  • Level -3 ratio improved from 46.80% to 46.46%
  • Factorized LZ77 match finding into dedicated function
  • Refactored LZ77 parameters for better compression level control
  • Optimized memory usage for extra lengths encoding
  • Implemented offset encoding in GHI format
  • RLE Analysis: Optimized Run-Length Encoding analysis using AVX-512 instructions.

Technical Changes

Code Quality & Architecture

  • Fixed bitwise expression issues
  • Fixed size calculation in encoder
  • Conditionally defined labels for better code organization
  • Removed dead code
  • LZ77: Fixed distance comparisons by enforcing strict inequality, preventing potential out-of-bounds memory access.
  • VByte: Improved encoding/decoding logic by adding a mask to the 5th vbyte to prevent data corruption.
  • Bit Manipulation: Resolved undefined behavior occurring during bit twiddling operations.
  • Fix NEON32 min value calculation
  • Set compression levels as enums for type safety
  • Optimized stream engine for error handling
  • Ensured buffer safety in GHI and GLO decoding

Build & Maintenance

  • Compiler Warnings: Implemented conditional compilation to suppress unused label warnings when specific SIMD instruction sets are disabled.
  • Linting: Fixed issues with Unicode linting.
  • Improves code analysis speed
  • Resolved various build warnings to improve code hygiene.
  • Enables BMI2 instruction set for AVX2/AVX512
  • Improves Windows compilation
  • Enhanced test coverage

LICENSE

  • Updated third-party components section
  • Replaced xxHash attribution with rapidhash (MIT License by Nicolas De Carli)

Full Changelog: v0.4.0...v0.5.0

Don't miss a new zxc release

NewReleases is sending notifications on new releases.