Skip to content

SuperInstance/bwt-compress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

bwt-compress

Burrows-Wheeler Transform based compression pipeline in pure Rust with no external dependencies.

Features

  • 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

Usage

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

License

MIT

About

Burrows-Wheeler Transform with suffix array construction — Rust compression library

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages