5 unstable releases

0.3.0 Oct 26, 2022
0.2.3 Oct 26, 2022
0.2.2 Oct 26, 2022
0.2.0 Oct 25, 2022
0.1.0 Oct 25, 2022

#683 in Compression

MIT/Apache

105KB
200 lines

rustyman

Version Downloads License Rust Docs

Huffman compression and decompression implemented in rust

Example

use rustyman::Huffman;

let payload = b"hello from the other side of the river";

let huffman = Huffman::new_from_data(payload);
let compressed = huffman.compress(payload);
let decompressed = huffman.decompress(&compressed);

assert!(compressed.len() < payload.len());
assert_eq!(&payload[..], decompressed);

License: MIT OR Apache-2.0


lib.rs:

Version Downloads License Rust Docs

Huffman compression and decompression implemented in rust

Example

use rustyman::Huffman;

let payload = b"hello from the other side of the river";
    
let huffman = Huffman::new_from_data(payload);
let compressed = huffman.compress(payload);
let decompressed = huffman.decompress(&compressed);

assert!(compressed.len() < payload.len());
assert_eq!(&payload[..], decompressed);

Dependencies

~93KB