SkillAgentSearch skills...

Zxc

High-performance asymmetric lossless compression. 40%+ faster decompression than LZ4 on ARM64 with better compression ratios. Optimized for Game Assets, Firmware & App Bundles.

Install / Use

/learn @hellobertrand/Zxc

README

ZXC: High-Performance Asymmetric Lossless Compression

Build & Release Code Security Fuzzing Benchmark Snyk Security Code Coverage

ConanCenter Vcpkg Homebrew Debian 14 Ubuntu 26.04

Crates.io PyPi npm

License

ZXC is a high-performance, lossless, asymmetric compression library optimized for Content Delivery and Embedded Systems (Game Assets, Firmware, App Bundles). It is designed to be "Write Once, Read Many" (WORM). Unlike codecs like LZ4, ZXC trades compression speed (build-time) for maximum decompression throughput (run-time).

TL;DR

  • What: A C library for lossless compression, optimized for maximum decompression speed.
  • Key Result: Up to >40% faster decompression than LZ4 on Apple Silicon, >25% faster on Google Axion (ARM64), >5% faster on x86_64, all with better compression ratios.
  • Use Cases: Game assets, firmware, app bundles, anything compressed once, decompressed millions of times.
  • Install: conan install --requires="zxc/[*]" · vcpkg install zxc · brew install zxc · pip install zxc-compress · cargo add zxc-compress · npm i zxc-compress
  • Quality: Fuzzed, sanitized, formally tested, thread-safe API. BSD-3-Clause.

Verified: ZXC has been officially merged into the lzbench master branch. You can now verify these results independently using the industry-standard benchmark suite.

ZXC Design Philosophy

Traditional codecs often force a trade-off between symmetric speed (LZ4) and archival density (Zstd).

ZXC focuses on Asymmetric Efficiency.

Designed for the "Write-Once, Read-Many" reality of software distribution, ZXC utilizes a computationally intensive encoder to generate a bitstream specifically structured to maximize decompression throughput. By performing heavy analysis upfront, the encoder produces a layout optimized for the instruction pipelining and branch prediction capabilities of modern CPUs, particularly ARMv8, effectively offloading complexity from the decoder to the encoder.

  • Build Time: You generally 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)

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 | 11,934 MB/s vs 5,647 MB/s 2.11x Faster | 61.5 vs 62.2 Smaller (-1.0%) | ZXC leads in raw throughput. | | 2. Standard | ZXC -3 vs LZ4 Default | 6,925 MB/s vs 4,804 MB/s 1.44x Faster | 46.4 vs 47.6 Smaller (-2.6%) | ZXC outperforms LZ4 in read speed and ratio. | | 3. High Density | ZXC -5 vs Zstd --fast 1 | 6,090 MB/s vs 2,167 MB/s 2.81x Faster | 40.6 vs 41.0 Equivalent (-1.0%) | ZXC outperforms Zstd in decoding speed. |

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 | 8,727 MB/s vs 4,868 MB/s 1.79x Faster | 61.5 vs 62.2 Smaller (-1.0%) | ZXC leads in raw throughput. | | 2. Standard | ZXC -3 vs LZ4 Default | 5,130 MB/s vs 4,182 MB/s 1.23x Faster | 46.4 vs 47.6 Smaller (-2.6%) | ZXC outperforms LZ4 in read speed and ratio. | | 3. High Density | ZXC -5 vs Zstd --fast 1 | 4,475 MB/s vs 1,763 MB/s 2.54x Faster | 40.6 vs 41.0 Equivalent (-1.0%) | ZXC outperforms Zstd in decoding speed. |

3. Build Server: x86_64 (AMD EPYC 7763)

Scenario: CI/CD Pipelines compatibility.

| Target | ZXC vs Competitor | Decompression Speed | Ratio | Verdict | | :--- | :--- | :--- | :--- | :--- | | 1. Max Speed | ZXC -1 vs LZ4 --fast | 6,779 MB/s vs 4,116 MB/s 1.65x Faster | 61.5 vs 62.2 Smaller (-1.0%) | ZXC achieves higher throughput. | | 2. Standard | ZXC -3 vs LZ4 Default | 3,849 MB/s vs 3,573 MB/s 1.08x Faster | 46.4 vs 47.6 Smaller (-2.6%) | ZXC offers improved speed and ratio. | | 3. High Density | ZXC -5 vs Zstd --fast 1 | 3,495 MB/s vs 1,573 MB/s 2.22x Faster | 40.6 vs 41.0 Equivalent (-1.0%) | ZXC provides faster decoding. |

(Benchmark Graph ARM64 : Decompression Throughput & Storage Ratio (Normalized to LZ4)) Benchmark Graph ARM64

Benchmark ARM64 (Apple Silicon)

Benchmarks were conducted using lzbench 2.2.1 (from @inikep), compiled with Clang 17.0.0 using MOREFLAGS="-march=native" on macOS Sequoia 15.7.2 (Build 24G325). The reference hardware is an Apple M2 processor (ARM64). All performance metrics reflect single-threaded execution on the standard Silesia Corpus.

| Compressor name | Compression| Decompress.| Compr. size | Ratio | Filename | | --------------- | -----------| -----------| ----------- | ----- | -------- | | memcpy | 52905 MB/s | 52854 MB/s | 211938580 |100.00 | 12 files| | zxc 0.9.0 -1 | 950 MB/s | 11934 MB/s | 130408237 | 61.53 | 12 files| | zxc 0.9.0 -2 | 615 MB/s | 9879 MB/s | 114657730 | 54.10 | 12 files| | zxc 0.9.0 -3 | 240 MB/s | 6925 MB/s | 98234598 | 46.35 | 12 files| | zxc 0.9.0 -4 | 169 MB/s | 6584 MB/s | 91698141 | 43.27 | 12 files| | zxc 0.9.0 -5 | 93.2 MB/s | 6090 MB/s | 86054926 | 40.60 | 12 files| | lz4 1.10.0 | 815 MB/s | 4804 MB/s | 100880147 | 47.60 | 12 files| | lz4 1.10.0 --fast -17 | 1345 MB/s | 5647 MB/s | 131723524 | 62.15 | 12 files| | lz4hc 1.10.0 -12 | 14.0 MB/s | 4537 MB/s | 77262399 | 36.46 | 12 files| | zstd 1.5.7 -1 | 644 MB/s | 1622 MB/s | 73229468 | 34.55 | 12 files| | zstd 1.5.7 --fast --1 | 725 MB/s | 2167 MB/s | 86932028 | 41.02 | 12 files| | brotli 1.2.0 -0 | 539 MB/s | 405 MB/s | 78306095 | 36.95 | 12 files| | snappy 1.2.2 | 830 MB/s | 3265 MB/s | 101352257 | 47.82 | 12 files|

Benchmark ARM64 (Google Axion)

Benchmarks were conducted using lzbench 2.2.1 (from @inikep), compiled with GCC 12.2.0 using MOREFLAGS="-march=native" on Linux 64-bits Debian GNU/Linux 12 (bookworm). The reference hardware is a Google Neoverse-V2 processor (ARM64). All performance metrics reflect single-threaded execution on the standard Silesia Corpus.

| Compressor name | Compression| Decompress.| Compr. size | Ratio | Filename | | --------------- | -----------| -----------| ----------- | ----- | -------- | | memcpy | 24237 MB/s | 24131 MB/s | 211938580 |100.00 | 12 files| | zxc 0.9.0 -1 | 853 MB/s | 8727 MB/s | 130408237 | 61.53 | 12 files| | zxc 0.9.0 -2 | 556 MB/s | 7303 MB/s | 114657730 | 54.10 | 12 files| | zxc 0.9.0 -3 | 226 MB/s | 5130 MB/s | 98234598 | 46.35 | 12 files| | zxc 0.9.0 -4 | 159 MB/s | 4879 MB/s | 91698141 | 43.27 | 12 files| | zxc 0.9.0 -5 | 84.9 MB/s | 4475 MB/s | 86054926 | 40.60 | 12 files| | lz4 1.10.0 | 749 MB/s | 4182 MB/s | 100880147 | 47.60 | 12 files| | lz4 1.10.0 --fast -17 | 1303 MB/s | 4868 MB/s | 131723524 | 62.15 | 12 files| | lz4hc 1.10.0 -12 | 12.9 MB/s | 3796 MB/s | 77262399 | 36.46 | 12 files| | zstd 1.5.7 -1 | 527 MB/s | 1364 MB/s | 73229468

Related Skills

View on GitHub
GitHub Stars311
CategoryDevelopment
Updated15h ago
Forks6

Languages

C

Security Score

85/100

Audited on Mar 29, 2026

No findings