Skip to main content

Crate lbzip2

Crate lbzip2 

Source
Expand description

lbzip2-rs — Pure Rust parallel bzip2 decompressor.

Architecture: 1 reader thread reads ~100 MB of raw compressed bzip2 data into a chunk buffer.

Per chunk the reader does a cheap bit-scan to locate bzip2 block boundaries (magic 0x314159265359 at arbitrary bit offsets), then fans the N sub-ranges out through the shared gatling engine (gatling::gatling_forkjoin::gatling_for_each) — the one constellation worker pool, NOT a private one.

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
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).

Functions§

functional_status
Introspection / emit marker — record one functional-status row for the nornir test matrix. Wraps nornir_testmatrix::functional_status behind the testmatrix feature (a compiled-out #[inline] no-op otherwise, with no nornir dep in the default build). Mirrors the korp-collectors reference wiring so nornir test --features testmatrix SEES the lbunzip2 CLI.