Consider the resources required for decompression
Consider the resources required for decompression
Posted Jan 19, 2026 1:26 UTC (Mon) by excors (subscriber, #95769)In reply to: Consider the resources required for decompression by jreiser
Parent article: Format-specific compression with OpenZL
In that case (or even smaller), I've found Zlib is surprisingly good. The uzlib implementation takes about 2KB of ROM (on Cortex-M4), and about 1KB RAM + window size (max 32KB but you can probably reduce it to 16KB or 8KB without much impact on compression ratio). If you're storing compressed data in flash (e.g. when downloading a firmware update) then you want to minimise `code_size + uncompressed_size * compression_ratio`, and I suspect it's going to be hard to beat uzlib with a more sophisticated algorithm until you're getting up in the hundreds of KBs of data.
It would be nice if there were more algorithms (with size-optimised implementations) competing in that space, and benchmarks showing what's the best tradeoff in different ranges. It sounds like that's not what OpenZL is interested in though, since it's currently designed with a universal decompressor that will presumably be huge.
