add KMP algorithm implementation and Huffman encoding