r/compression • • 1d ago

Wrote a multi-core-native, SIMD lossless compression codec, originally for my engine, but just released to github with permissive license!

https://github.com/JoseIgnacioAragon/axz

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/s 1T / 17.0 GiB/s 16T decode
  • AXZ -5: 2.90x | 3.24 GiB/s 1T / 17.0 GiB/s 16T decode (matches Zstd -1 ratio 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.

12 Upvotes

7 comments sorted by

2

u/Fedor_Doc 1d ago

Why Silesia in the post if it is for gamedev?

Slow to encode, fast to decode compressors are abundant now, why your version is preferable? 

zstd will be maintained for years to come, what about your compressor?

0

u/Alcacholaruz 1d ago

hey hey! tanks for commenting
Its just free and its there, im not planning to market it nor anything, simply just there, thought might be cool to share and for people to snoop around, i'll mantain it as long as i use my engine which will be for a good while :)

so yeah tldr, made it for my engine, wanted to share it, is there.

1

u/powturbo 1d ago edited 16h ago

I've integrated axz into TurboBench Compression Benchmark, because of SIMD and made a quick test (single thread).

Block based multithreading in decode is simple to implement, when needed.

TurboBench: 2026.12.01 - AMD Ryzen 5 6600HS - silesia.tar

C Sizeratio%C MB/sD MB/sRankName
5246524624.75%2.393138.2613misa77 13
5805191327.39%31.391688.5010zstd 12
5805890827.39%53.643019.514🥈misa77 11
5918465527.92%68.981658.0011zstd 9
6621700831.24%292.191551.405🥉zstd 3
6854578932.34%3.076348.623🥇misa77 6
7294772834.42%13.213297.3214axz 5
7738536336.51%15.804852.758lz4 12
7800200336.80%43.234740.529lz4 9
7900631537.28%85.814660.776lz4 5
7999409037.74%86.153559.8312axz 4
9028067942.60%137.668089.951👑misa77 3
9603508045.31%293.613795.987axz 1
10033564447.34%832.204915.772🏆lz4 1

.
and a game dataset (11 files) oodle 89=Kraken, 99=Mermaid, 119=Selkie

C Sizeratio%C MB/sD MB/sRankName
795059924.89%2.021766.0112oodle 89
885491727.72%5.872554.324🥈oodle 99
927235029.03%3.332618.188misa77 13
927251229.03%2.312640.4711misa77 5
956481729.94%2.741243.7413zstd 22
1043927732.68%32.921478.725🥉zstd 12
1074713733.65%286.581404.846zstd 3
1297775240.63%23.712964.992🏆axz 5
1338615741.91%8.844670.543🥇oodle 119
1372142242.96%120.313369.741👑axz 4
1412412844.22%3.796286.527misa77 4
1412412844.22%3.736280.3410misa77 6
1423435544.56%13.434270.879lz4 12

1

u/Alcacholaruz 1d ago

hey hey! thanks for posting it

a quick note about the mcore part of it, i've spent most of the effort there since my game engine(which i'll open source soon) is mcore by default in a non intrusive way, it has some cool stuff like game specific customizations through CTE to speed up decoding even more(aside from the per type tweaks ofc)

1

u/Character-Intern8753 21h ago

You might want to try out misa77 for your assets, I invested a little time in making it compress game assets well specifically, and some results can be found in the README.

1

u/Alcacholaruz 11h ago

will check it out today, thanks!

1

u/Specialist_Data_5403 1d ago

Haven't seen Odin in a long time. Nice!