tinybz2 0.1.1

Minimal-memory bz2 compressor/decompressor for embedded targets
Documentation
  • Coverage
  • 92.86%
    117 out of 126 items documented0 out of 64 items with examples
  • Size
  • Source code size: 91.2 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 5.8 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • HeroesLament

tinybz2 — Minimal-memory bz2 for embedded targets

A no_std, zero-dependency bz2 compressor and decompressor designed to run on ESP32 and other memory-constrained microcontrollers.

Design goals

  • ~110 KB peak RAM at block size 1 (100 KB blocks) for both compress and decompress — roughly 10× less than stock libbz2.
  • Zero heap allocation — all working memory is caller-provided via fixed-size workspace structs.
  • no_std + no alloc — suitable for bare-metal and RTOS targets.
  • Streaming API — process data in chunks without buffering the entire input.

Memory budget at block size 1 (100 000 bytes)

Component Bytes
Block buffer 100 000
BWT workspace 512
MTF table 256
Huffman tables 10 000
Bookkeeping 1 024
Total ~112 KB