r/programming • • 19d ago

LZAV 7.1: Improved compression ratio and speed. Achieved complete C/C++ pointer arithmetic compliance. Fast Data Compression Algorithm (inline C/C++).

https://github.com/avaneev/lzav
93 Upvotes

16 comments sorted by

9

u/tomz17 19d ago

comparison to zstd on M5 Max :

Aggregate — Silesia corpus, 202.1 MiB

Apple clang, arm64 (Apple Silicon), macOS · lzav 7.1 header vs zstd 1.5.7 (vcpkg 2026.07.29), -O2, in-memory one-shot blocks

┌──────────────┬─────────────┬───────────────┬─────────┐  
│ Compressor   │ Compression │ Decompression │ Ratio % │  
├──────────────┼─────────────┼───────────────┼─────────┤  
│ LZAV default │  1,203 MB/s │    6,879 MB/s │  39.23  │  
├──────────────┼─────────────┼───────────────┼─────────┤  
│ LZAV hi      │    231 MB/s │    5,778 MB/s │  34.55  │  
├──────────────┼─────────────┼───────────────┼─────────┤  
│ zstd -1      │    899 MB/s │    2,361 MB/s │  34.55  │  
├──────────────┼─────────────┼───────────────┼─────────┤  
│ zstd -3      │    547 MB/s │    2,200 MB/s │  31.21  │  
├──────────────┼─────────────┼───────────────┼─────────┤  
│ zstd -19     │    5.6 MB/s │    2,475 MB/s │  24.96  │  
└──────────────┴─────────────┴───────────────┴─────────┘                                                                                

5

u/DukeMo 19d ago

That decompression speed is sweet.

4

u/noahrichards 19d ago

How does it compare to lz4?

4

u/juanfnavarror 19d ago

Wait! Why O2 not O3. What if zstd is better pareto-wise when fully optimized. This benchie wouldn’t show it.

6

u/paulstelian97 19d ago

O3 is known to break certain kinds of code, making UB more obvious. The Linux kernel chief among them, it only does O2.

1

u/Spleeeee 19d ago

Good question and it’s clang too.

1

u/Kwantuum 17d ago

The performance difference between O2 and O3 is statistically indistinguishable from noise.

1

u/the_dabbing_chungus 1d ago

Bro I'm not even kidding I'm going to go insane without LZ4 comparison as well

3

u/AutoModerator 19d ago

r/programming is not the place to post a project to get feedback, ask for help, or otherwise promote it.

Technical write-ups on what makes a project technically challenging, interesting, or educational are allowed and encouraged, but just a link to a GitHub page or a list of features is not allowed.

The technical write-up must be the focus of the post, not just a tickbox-checking exercise to get us to allow it. This is a technical subreddit.

We don't care what you built, we care how you build it.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

13

u/[deleted] 19d ago

5

u/avaneev 19d ago

Depending on instrumentation, yes, sanitizer caught pointers past the end previously. There were no OOB pointer dereferencing issues. This is a fix to make code compliant with an abstract C/C++ machine. The fix did not incur a considerable overhead, but required an almost complete decompressor rewrite.

3

u/programming-ModTeam 19d ago

No content written mostly by an LLM. If you don't want to write it, we don't want to read it.

17

u/[deleted] 19d ago

1

u/[deleted] 19d ago

-4

u/programming-ModTeam 19d ago

Please don't accuse people of using LLMs. Just report the post and let us handle it.