I'd love to see a deeper comparison against LZ4. An LZ4-style decoder can be made minimal, and one can use LZ4HC to achieve better density without sacrificing decompression speed.
You're right : a minimalist LZ4 decoder can be written in ~150-200 bytes of assembly or even ~35 lines of C because it doesn't have to handle a bitstream. However, LZ0's compact decoders are exactly the same size:
lz0dec_x86_64.s: 184 bytes
lz0dec_arm64.s: 180 bytes (pure leaf, 0 bytes of stack)
lz0dec_riscv64.s: 160 bytes (pure leaf, 0 bytes of stack)
lz0dec_min.c: 47 lines of C, 0 allocations, 0 libc
So LZ0 offers the same decoder compactness as a minimal LZ4 decoder, but for an Elias gamma bitstream with arbitrary window.
just in case my previous reply isn't visible to everyone: I did respond to your message, but it seems HN's moderation system flagged my comment (and 2 other answers I did to other questions), not that I did not want to respond
For any further questions, please use the GitHub issues.
Since roughly half of my replies here get flagged in seconds for no valid reason (they are technical, neutral, and certainly not ai generated slop), I'm stopping all communication in this thread. It's simply frustrating and pointless.
README.md in particular mixes English and French, which was confusing at first. I have seen this person from encode.su, where one said one is not fluent in English so uses French as an LLM prompt, so that's probably why.
No offence, as you're absolutely right: originally, I wrote this for my own personal needs, mainly for embedding resources into binaries or for use on highly constrained systems. I was simply looking for an alternative to ZX0, which has a very good ratio, a very simple decoder, and good decompression speed. However, its encoding is extremely slow (far too slow for my use cases). There's also UPKR, which achieves even better ratios and has fast encoding, but its decoder is more complex and, above all, quite slow at decompression. My idea was to try to build something offering the density of an optimal unbounded-window compressor while approaching the throughput of LZ4-class codecs (with a 2x to 4x factor, vs 30x to 100x deficit for ZX0/UPKR). I ended up with a (maybe) interesting compromise, and that's why I decided to post it on GitHub and here, thinking this work might serve as inspiration for other developers...
I'm doing this in my free time, and while I've put a lot of care into my code, I DID use LLMs to format and write the GitHub documentation, especially since all my notes for this project were pretty chaotic... The result is indeed a bit "AI slop", but as I explained, I didn't think it would interest that many people anyway, so apart from a (too) quick proofread, I honestly didn't carefully revise the README in particular. Sorry about that, I'll try to fix it.
Thanks for being forthcoming and honest. I think a hand-written README will really stand out in this day and age, since we get so few of them!
I recently used ZX0 for a project where I wanted a lot of compression on slow hardware (basically using it to page in/out code, as ZX0 can compress most architectures quite well).
Comments (21) 11 threads
Earlier commentsSo LZ0 offers the same decoder compactness as a minimal LZ4 decoder, but for an Elias gamma bitstream with arbitrary window.
Still, it could be a good fit for use cases like embedded systems with very limited bandwidth and RAM.
[1] https://github.com/powturbo/TurboBench
[2] https://github.com/powturbo/TurboBench/blob/master/turbobenc...
Since roughly half of my replies here get flagged in seconds for no valid reason (they are technical, neutral, and certainly not ai generated slop), I'm stopping all communication in this thread. It's simply frustrating and pointless.
I recently used ZX0 for a project where I wanted a lot of compression on slow hardware (basically using it to page in/out code, as ZX0 can compress most architectures quite well).
All comments shown.
Couldn't load more comments. Check your connection and try again.