Burrows-Wheeler Transform based compression pipeline in pure Rust with no external dependencies.
- Suffix array construction: O(n log²n) suffix array builder
- BWT forward/inverse: Efficient Burrows-Wheeler Transform with LF-mapping
- Move-to-front encoding: Improves compressibility after BWT
- Run-length encoding: Compresses runs of identical values
- Compression pipeline: Complete BWT → MTF → RLE chain
use bwt_compress::*;
// Compress and decompress
let input = b"the quick brown fox jumps over the lazy dog";
let compressed = compress(input);
let decompressed = decompress(&compressed);
assert_eq!(&decompressed[..], input);
// Individual transforms
let (bwt_data, idx) = bwt_transform(b"banana");
let restored = bwt_inverse(&bwt_data, idx);MIT