Run Code  | Code Wall  | Users  | Misc  | Feedback  | About  | Login  | Theme  | Privacy 

Huffman code size

Language: Editor: Layout:
+ ] Show input
Absolute running time: 0.09 sec, cpu time: 0.02 sec, memory peak: 3 Mb, absolute service time: 0,1 sec 
fork mode |  history  | discussion
Encoding 4 letters with probabilities .5, .25, .15, .1 using Huffman code would take 1.75 bits per letter.
Encoding message of length 1000 would take 218.75 bytes.