r/C_Programming • u/Kabra___kiiiiiiiid • 30m ago
r/C_Programming • u/Alcacholaruz • 18h ago
Project Wrote a multi-core-native, SIMD lossless compression codec, originally for my engine, but just released to github with permissive license!
Hey everyone,
I originally built this compression algorithm for my own game engine because I wanted an open-source middle ground between LZ4 and Zstd for game dev workloads (paks, streaming assets, snapshots, small netcode packets). Full disclosure: I have background in network and low-level optimization, and I used AI to help me bridge the domain gap in compression itself while steering the architecture, profiling, and verifying everything on real hardware.
It turned out useful enough that I split it into a standalone zero-dependency library + CLI in both C11 and native Odin (100% wire-compatible, Apache-2.0, Linux/macOS/Windows):
https://github.com/JoseIgnacioAragon/axz
Quick numbers on the standard 202 MiB Silesia corpus (Intel Core 7 240H, AVX2, in-memory):
AXZ -1:2.21x|3.36 GiB/s1T /17.0 GiB/s16T decodeAXZ -5:2.90x|3.24 GiB/s1T /17.0 GiB/s16T decode (matchesZstd -1ratio while decoding ~2x faster 1T and ~11x faster 16T, since standard Zstd frames don't parallelize decode)- On a 32T Ryzen 9 7950X (AVX-512VBMI2) it scales up to 58 GiB/s multi-core decode.
It's multi-core native in the wire format, skips bit-level Huffman/ANS in favor of SIMD planar tables, and includes 11 per-chunk pre-filters (RGBA8, Float4_Xor, Delta, SoA, etc.) plus 8-byte micro-packets + 8 KiB dictionaries for small RPC/netcode payloads. ARM64 NEON isn't in yet (runs scalar fallback for now), and -5 is intentionally slow to encode for offline asset cooking.