← metal

PicoCompress

Decode at 540 MB/s. Encode at 47 MB/s. Using 4.6 KB RAM.

⌥ repo

Tiny dependency-free C compression library. Runs on Arduino, ESP32, Pico W/2W, and Raspberry Pi — from 2K SRAM to Linux SBCs. Beats brotli q1 on ratio. Decodes 2-5× faster. Uses 3,600× less memory.

Encoder profiles

Micro1.0 KB encode — fits on ATmega328P with 2K SRAM
Balanced4.6 KB encode — Pico W, ESP32-C3, general embedded
Q37.7 KB encode — Pico 2W, ESP32, medium MCUs
Q413.8 KB encode — Pi 3/4/5, ESP32-S3, Linux SBCs

All profiles produce decoder-compatible streams. Any encoder, any decoder, always interoperable.

Features

  • Streaming and buffer-based APIs
  • Cross-block history up to 2048-byte sliding window
  • 64-entry static dictionary (JSON, CSV, HTTP, English, binary)
  • 3-entry LRU repeat-offset cache
  • Hardware acceleration: NEON 16B/cycle, CRC32 hash, CLZ match
  • Cortex-M0 safe — no unaligned loads

vs the competition

picocompressheatshrinkbrotli q1
Encode RAM4.6 KB12.5 KB16.7 KB
Decode RAM1.5 KB2.0 KB31.5 KB
json-4K decode541 MB/s115 MB/s106 MB/s
Runs on a Cortex-M0 with just 2K SRAM. No other compression library in its class can compress there.

View on GitHub →