Expand description
lbzip2-rs — Pure Rust parallel bzip2 decompressor.
Architecture: 1 reader thread fills a ChunkRevolver ring buffer (~100 MB slots) with raw compressed bzip2 data.
Per slot the reader does a cheap SIMD bit-scan to locate bzip2 block boundaries (magic 0x314159265359 at arbitrary bit offsets), then dispatches N sub-ranges to a worker pool.
Each worker independently decodes its Burrows-Wheeler blocks and
produces decompressed output. Results are reassembled in order and
emitted as a streaming Read.
Modules§
- bitreader
- Bit-level reader over a byte slice. Zero-copy — borrows the slice.
- block
- bzip2 block decoder.
- block_
scan - SIMD-friendly bit-level scanner for bzip2 block boundaries.
- bwt
- Inverse Burrows-Wheeler Transform.
- chunk
- Chunk-level parallel bzip2 decoder.
- huffman
- Canonical Huffman tree decoder for bzip2.
- mtf
- Move-to-front transform decoder.
- parallel
- Parallel bzip2 decompression — decode N blocks concurrently.
- reader
- Streaming parallel bzip2 decompressor implementing
Read. - stream
- bzip2 stream decoder — sequential multi-block decompression.
Constants§
- BLOCK_
MAGIC - bzip2 block magic: π digits — 0x314159265359 (48 bits, bit-aligned).
- FINAL_
MAGIC - bzip2 end-of-stream magic: √π digits — 0x177245385090 (48 bits).