The contained functions are showing, how huffman coding (and decoding) work.
Base of all is building a histogram vector. Based upon the histogram, the
corresponding coding table is generated. Matrices or vectors with positive
numbers can be used as input sequence. The compressed binary output sequence is
represented as a string. The reverse operation is also possible.
It is also very interesting to play with modifications of the binary output
sequence: What happens with the decoded output sequence ? Where are the
Have fun !