Skip to content
/ rustyman Public

Huffman compression and decompression implemented in rust

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

edg-l/rustyman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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