SkillAgentSearch skills...

Zxc

Seekable lossless compression with O(1) random access, built for ultra-fast decode. Faster than LZ4 (40%+ on ARM64), with better ratios. C library, write-once/read-many.

Install / Use

npx skills add hellobertrand/zxc

Installs into whichever agent you are using.

README

ZXC - Asymmetric Lossless Compression Built for Ultra-Fast Decode

Build & Release Code Quality Code Security Fuzzing

<!-- [![Benchmark](https://github.com/hellobertrand/zxc/actions/workflows/benchmark.yml/badge.svg)](https://github.com/hellobertrand/zxc/actions/workflows/benchmark.yml) --> <!-- [![Snyk Security](https://snyk.io/test/github/hellobertrand/zxc/badge.svg)](https://snyk.io/test/github/hellobertrand/zxc) -->

Security Code Coverage OpenSSF Scorecard License

ZXC is a lossless compression C library (with official Rust, Python, Node.js, and Go bindings). It trades compression speed for maximum decode throughput — the appropriate trade-off whenever data is compressed once and read many times: content delivery, embedded systems, FOTA (Firmware Over-The-Air) updates, game assets, and app bundles. It runs on all major architectures (x86_64, ARM64, ARMv7, ARMv6, RISC-V, POWER, s390x, i386) with hand-tuned SIMD paths, and shows particularly strong gains on modern ARM cores (Apple Silicon, AWS Graviton, Google Axion) thanks to a bitstream layout tuned for their deep pipelines.

TL;DR

  • Faster decode than LZ4, at a smaller size. 9–48% faster decode at the default level (best on ARM64), rising to up to 2.3× in the speed-optimized tier, always at an equal-or-better compression ratio. See the benchmarks.
  • Independently verified. Merged into lzbench (@inikep) and TurboBench (@powturbo); every benchmark below is reproducible against 70+ codecs.
  • Cross-platform. x86_64, ARM64, ARMv7, ARMv6, RISC-V, POWER (ppc64el), s390x, i386, with hand-tuned SIMD (SSE2/AVX2/AVX-512 on x86, NEON on ARMv8+).
  • Built for "Write Once, Read Many." Compress once at build time, decompress millions of times at run time.
  • Production-grade. 5B+ fuzzing iterations, ASan/UBSan/Valgrind-clean, SLSA-signed releases, thread-safe API, BSD-3-Clause.
  • Seekable. Built-in seek table for O(1) random-access decompression.
  • Broadly packaged. Conan, vcpkg, Homebrew, Winget and Rust/Python/Node packages.

Quick start

# Install (pick your package manager)
brew install zxc
conan install --requires="zxc/[*]"     # or: vcpkg install zxc

# Compress once, decompress fast
zxc -5 assets.tar assets.tar.zxc
zxc -d assets.tar.zxc assets.tar

Independently verified: ZXC is merged into both major open-source compression benchmark suites — lzbench (master, by @inikep) and TurboBench (master, by @powturbo). Every number in this README is reproducible with either tool, alongside 70+ other codecs.

Design Philosophy: Asymmetric Efficiency

Traditional codecs force a trade-off between symmetric speed (LZ4) and archival density (Zstd). ZXC takes a third path: asymmetric efficiency.

The encoder does the heavy lifting upfront — match selection, optimal parsing, statistics tuning — to emit a bitstream structured for the instruction pipelining and branch prediction of modern CPUs (particularly ARMv8). Complexity is offloaded from the decoder to the encoder, which is exactly the trade-off WORM workloads want.

  • Build time: you compress only once (on CI/CD).
  • Run time: you decompress millions of times (on every user's device). ZXC respects this asymmetry.

👉 Read the Technical Whitepaper

Benchmarks

To ensure consistent performance, benchmarks are automatically executed on every commit via GitHub Actions. We monitor metrics on both x86_64 (Linux) and ARM64 (Apple Silicon M2) runners to track compression speed, decompression speed, and ratios.

(See the latest benchmark logs)

Decompression Speed vs Compressed Size — ARM64 Apple M2

Decompression Speed vs Compressed Size

1. Mobile & Client: Apple Silicon (M2)

Scenario: Game Assets loading, App startup.

| Target | ZXC vs Competitor | Decompression Speed | Ratio | Verdict | | :--- | :--- | :--- | :--- | :--- | | 1. Max Speed | ZXC -1 vs LZ4 --fast | 12,699 MB/s vs 5,607 MB/s 2.26x Faster | 61.5 vs 62.2 Smaller (-0.7%) | ZXC leads in raw throughput. | | 2. Standard | ZXC -3 vs LZ4 Default | 7,020 MB/s vs 4,769 MB/s 1.47x Faster | 45.8 vs 47.6 Smaller (-1.8%) | ZXC outperforms LZ4 in read speed and ratio. | | 3. Density | ZXC -6 vs LZ4HC -9 | 6,111 MB/s vs 4,521 MB/s 1.35x Faster | 36.3 vs 36.8 Smaller (-0.5%) | ZXC beats LZ4HC on both decode speed and ratio. | | 4. Ultra | ZXC -7 vs zstd -1 | 4,240 MB/s vs 1,803 MB/s 2.35x Faster | 33.1 vs 34.5 Smaller (-1.4%) | ZXC -7 bridges the gap between LZ4HC and zstd -1 — smaller output, ~2.4x faster decode. |

2. Cloud Server: Google Axion (ARM Neoverse V2)

Scenario: High-throughput Microservices, ARM Cloud Instances.

| Target | ZXC vs Competitor | Decompression Speed | Ratio | Verdict | | :--- | :--- | :--- | :--- | :--- | | 1. Max Speed | ZXC -1 vs LZ4 --fast | 9,225 MB/s vs 4,942 MB/s 1.87x Faster | 61.5 vs 62.2 Smaller (-0.7%) | ZXC leads in raw throughput. | | 2. Standard | ZXC -3 vs LZ4 Default | 5,128 MB/s vs 4,257 MB/s 1.20x Faster | 45.8 vs 47.6 Smaller (-1.8%) | ZXC outperforms LZ4 in read speed and ratio. | | 3. Density | ZXC -6 vs LZ4HC -9 | 4,370 MB/s vs 3,836 MB/s 1.14x Faster | 36.3 vs 36.8 Smaller (-0.5%) | ZXC beats LZ4HC on both decode speed and ratio. | | 4. Ultra | ZXC -7 vs zstd -1 | 3,000 MB/s vs 1,645 MB/s 1.82x Faster | 33.1 vs 34.5 Smaller (-1.4%) | ZXC -7 bridges the gap between LZ4HC and zstd -1 — smaller output, ~1.8x faster decode. |

3. Build Server: x86_64 (AMD EPYC 9B45 / Zen 5)

Scenario: CI/CD Pipelines compatibility.

| Target | ZXC vs Competitor | Decompression Speed | Ratio | Verdict | | :--- | :--- | :--- | :--- | :--- | | 1. Max Speed | ZXC -1 vs LZ4 --fast | 10,885 MB/s vs 5,132 MB/s 2.12x Faster | 61.5 vs 62.2 Smaller (-0.7%) | ZXC achieves higher throughput. | | 2. Standard | ZXC -3 vs LZ4 Default | 6,069 MB/s vs 4,912 MB/s 1.24x Faster | 45.8 vs 47.6 Smaller (-1.8%) | ZXC offers improved speed and ratio. | | 3. Density | ZXC -6 vs LZ4HC -9 | 5,460 MB/s vs 4,753 MB/s 1.15x Faster | 36.3 vs 36.8 Smaller (-0.5%) | ZXC now beats LZ4HC on both decode speed and ratio. | | 4. Ultra | ZXC -7 vs zstd -1 | 4,080 MB/s vs 1,862 MB/s 2.19x Faster | 33.1 vs 34.5 Smaller (-1.4%) | ZXC -7 bridges the gap between LZ4HC and zstd -1 — smaller output, ~2.2x faster decode. |

4. Production Server: x86_64 (AMD EPYC 7B13 / Zen 3)

Scenario: Mainstream cloud workloads (AWS c6a, Azure HBv3, GCP n2d).

| Target | ZXC vs Competitor | Decompression Speed | Ratio | Verdict | | :--- | :--- | :--- | :--- | :--- | | 1. Max Speed | ZXC -1 vs LZ4 --fast | 7,843 MB/s vs 4,490 MB/s 1.75x Faster | 61.5 vs 62.2 Smaller (-0.7%) | ZXC holds a strong lead on the legacy x86 pipeline. | | 2. Standard | ZXC -3 vs LZ4 Default | 4,191 MB/s vs 3,889 MB/s 1.08x Faster | 45.8 vs 47.6 Smaller (-1.8%) | ZXC delivers faster decode and smaller output. | | 3. Density | ZXC -6 vs LZ4HC -9 | 3,751 MB/s vs 3,726 MB/s (decode within 1%) | 36.3 vs 36.8 Smaller (-0.5%) | ZXC now edges ahead of LZ4HC -9 on decode and wins on ratio. | | 4. Ultra | ZXC -7 vs zstd -1 | 2,675 MB/s vs 1,337 MB/s 2.00x Faster | 33.1 vs 34.5 Smaller (-1.4%) | ZXC -7 bridges the gap between LZ4HC and zstd -1 — smaller output, ~2x faster decode. |

Decompression Speed: ZXC vs LZ4 family at equivalent ratio tiers, across 4 CPUs (Fast ≈ 62%, Default ≈ 47%, High ≈ 37%)

Decompression Speed: ZXC vs LZ4 family at equivalent ratio tiers

Effective Throughput : Ratio-Normalized Decode across ARM64 and x86 (decode x 100 / ratio%, LZ4 baseline = 1.00x)

Effective Throughput

What is Effective Throughput?

Raw decode speed misses half the picture: in real workloads (asset streaming, container pulls, microservice payloads), the decoder is fed by a compressed-byte source - disk, network, inter-core - whose bandwidth is the bottleneck. The right question is how much original data is delivered per MB of compressed input.

Formula: Effective (MB/s) = Decode × 100 / Ratio (%): combines decode speed and ratio in one number. **Ev

Related Skills

View on GitHub
GitHub Stars429
CategoryDevelopment
Updated1d ago
Forks9

Languages

C

Security Score

85/100

Audited on Aug 7, 2026

No findings