Show HN: Micro-RLE ≤264-byte compression for UART/MCU logs, zero RAM growth

Show HN (score: 5)
Found: November 01, 2025
ID: 2221

Description

Other
Show HN: Micro-RLE ≤264-byte compression for UART/MCU logs, zero RAM growth I needed to stuff twice the telemetry through the same 115 kbaud line on a Cortex-M0+ that only had 8 kB flash left.

Micro-RLE is the smallest drop-in I could come up with: 264 B of Thumb code, 36 B of state, no malloc, worst-case 14 cycles/byte and still lossless for every 8-bit pattern.

On the usual sensor streams (ADC, IMU, GPS) it’s 33-70 % smaller than raw output and boots in < 600 µs, so you can fire-and-forget from main() before the PLL even locks.

Repo is a single .c file and a 3-function API—replace the weak emit() hook with your UART / DMA / ring-buffer and you’re done.

Size proof: arm-none-eabi-size micro_rle.o text data bss 264 0 36

MIT licensed, link in the repo. Happy to hear where else this fits!

More from Show

Show HN: Matrirc – run irssi in 2026, talk to people on Matrix

Show HN: Matrirc – run irssi in 2026, talk to people on Matrix This solves no real problem — Element works, there&#x27;s already a Matrix-to-IRC bridge running on half the FOSS networks, and probably nobody under 30 has opened irssi voluntarily this decade.<p>I wrote it anyway because I miss Esc 4 and clunky window-split commands.<p>Matrirc is a local IRC server that speaks Matrix on the back. Point irssi at localhost:6667, log in with Matrix creds, rooms show up as channels.<p>brew tap pawelb0&#x2F;tap brew install matrirc

No other tools from this source yet.