Blaris
Blaris is a windowless, random-access LZSS compression algorithm for constrained microcontrollers. It resolves LZSS matches using the compressed payload itself instead of allocating a window buffer, achieving compression ratios comparable to (and sometimes better than) heatshrink and tamp while using minimal memory (~100 bytes of SRAM; 548-784 bytes of Flash and 104-112B of SRAM on RV32IMC), and significantly outperforms heatshrink and tamp when decompressing small slices (4-32 bytes).
What it addresses
Existing microcontroller compressors like heatshrink and tamp require the exact same window to be allocated in random-access workflows, so decompressing a small (4-32 bytes) chunk consumes as much memory as decompressing the entire payload.
Shared over time
Each entry reflects what was shared on that date. Details may have changed since then.
Blaris
Blaris is a windowless, random-access LZSS compression algorithm for constrained microcontrollers. It resolves LZSS matches using the compressed payload itself instead of allocating a window buffer, achieving compression ratios comparable to (and sometimes better than) heatshrink and tamp while using minimal memory (~100 bytes of SRAM; 548-784 bytes of Flash and 104-112B of SRAM on RV32IMC), and significantly outperforms heatshrink and tamp when decompressing small slices (4-32 bytes).
Problem: Existing microcontroller compressors like heatshrink and tamp require the exact same window to be allocated in random-access workflows, so decompressing a small (4-32 bytes) chunk consumes as much memory as decompressing the entire payload.
Posted by @lis05 · Original source ↗
Story title · @lis05 · · Source ↗
Show HN: Blaris – Windowless Random-Access LZSS for Constrained Microcontrollers
Submitted URL · @lis05 · · Source ↗
https://github.com/lis05/blaris
Source text · @lis05 · · Source ↗
blaris is a Windowless LZSS algorithm, meaning that it is LZSS but does not allocate a window. This allows it to reach the same compression ratio (and sometimes even better) as heatshrink and tamp, while keeping memory usage extremely minimal (around 100 bytes of SRAM).
Source text · @lis05 · · Source ↗
However, when random-access workflows are concerned (like extracting a single parameter from a configuration file), both compressors require the exact same window to be allocated. This means that, to decompress a small (4-32 bytes) chunk, memory consumption stays the same as when decompression the entire payload.
Source text · @lis05 · · Source ↗
When compiled for RV32IMC architecture, it takes only 548-784 bytes of Flash memory, while using just 104-112B of SRAM regardless of the file size.
Source text · @lis05 · · Source ↗
When decompressing small slices (4-32 bytes), blaris significantly outperforms both heatshrink and tamp (500x for 1B reads).
Source text · @lis05 · · Source ↗
Typical LZ77/LZSS works by copying a byte from the window buffer when resolving a match. Windowless version works by resolving this match using the compressed payload itself - following the chain of matches until it finds a literal run token.