Skip to content

sireliah/huffman_encoding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Huffman encoding

Rust implementation of Huffman encoding algorithm inspired by siggraph.org recipe

This proof-of-concept version supports 4 letters: ABCD with fixed probabilities:

Node {symbol: "A", prob: 0.4, left: None, right: None},
Node {symbol: "B", prob: 0.3, left: None, right: None},
Node {symbol: "C", prob: 0.2, left: None, right: None},
Node {symbol: "D", prob: 0.1, left: None, right: None},
[sireliah@sir huffman]$ ./huffman_coding
Type your text to encode.
ACCCCD
Your text: ACCCCD

Result: ["0", "101", "101", "101", "101", "100"]

About

Rust implementation of Huffman encoding algorithm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages