hn.today

LZAV 7.1: Enhanced Compression Ratio, Speed, and C/C++ Pointer Compliance

github.com3 points0 comments
Screenshot of LZAV 7.1: Enhanced Compression Ratio, Speed, and C/C++ Pointer Compliance

LZAV 7.1 is a portable, header-only C/C++ library for fast, lossless in-memory compression using LZ77. It aims to balance speed, compressed size, simplicity, and maintainability, with a standard mode for quick processing and a higher-compression mode for workloads where encoding speed matters less. The implementation supports 32- and 64-bit systems, multiple endiannesses, varied memory alignment, and WebAssembly. Its stated safety focus includes bounds checks during compression and decompression, allowing even malformed or damaged compressed input to be handled without out-of-bounds access or undefined behavior. The release title also highlights improved compression, speed, and C/C++ pointer compliance.

Benchmarks show the tradeoff against alternatives: on the Silesia corpus, standard LZAV compresses at roughly 600-660 MB/s and decompresses at 3,270-3,800 MB/s on the listed systems. Its compressed output occupies 39.23% of the original data, compared with 47.60% for LZ4, while LZ4 encodes and decodes faster. The high-compression mode reduces the data to 34.55% but runs at about 129-157 MB/s. Results vary by dataset; LZAV reports particularly strong gains on some text, logs, databases, and other structured data. The project provides basic compression and decompression APIs, custom C++ namespace support, and links to ports in several languages.

Read on github.com0 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.