Misa77 is an LZ compressor designed for data that is compressed once and decompressed repeatedly. It prioritizes single-threaded, in-memory decoding speed, accepting very slow encoding in exchange. Its compression uses bounded working memory for a chosen level, and its decoder is designed to terminate safely on corrupt or malicious input without out-of-bounds access or undefined behavior. The library offers two formats: lightweight levels 1-5, which use no entropy coding, and heavier levels 6 and 11-13, which pursue smaller files with greater encoding effort and memory use. The project recommends level 3 for fastest decoding, or levels 11-13 when compression size matters more.
Benchmarks on an Intel i7-14650HX show the tradeoff clearly. On the Silesia corpus, level 3 decoded at about 5.9 GB/s, versus 2.6 GB/s for LZ4; level 6 reached about 5.3 GB/s while compressing more tightly, but encoded at just 1.8 MB/s. Entropy-coded levels 11-13 produced sizes comparable to high-compression zstd levels and decoded roughly 2.5-3 times faster. Tests on a 263 MB game-asset corpus, including 256 KiB and 64 KiB blocks, showed similar patterns: very high decode throughput, with smaller blocks reducing performance and compression efficiency. These are single-threaded results from one specified machine, not a claim that misa77 is faster in every workload.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.