Ternary Tree and Clustering Based Huffman Coding Algorithm
In this study, the focus was on the use of ternary tree over binary
tree. Here, a new two pass Algorithm for encoding Huffman
ternary tree codes was implemented. In this algorithm we tried to
find out the codeword length of the symbol. Here I used the
concept of Huffman encoding. Huffman encoding was a two pass
problem. Here the first pass was to collect the letter frequencies.
You need to use that information to create the Huffman tree. Note
that char values range from -128 to 127, so you will need to cast
them. I stored the data as unsigned chars to solve this problem,
and then the range is 0 to 255. Open the output file and write the
frequency table to it. Open the input file, read characters from it,
gets the codes, and writes the encoding into the output file. Once
a Huffman code has been generated, data may be encoded simply
by replacing each symbol with its code. To reduce the memory
size and fasten the process of finding the codeword length for a
symbol in a Huffman tree, we proposed a memory efficient data
structure to represent the codeword length of Huffman ternary
tree. In this algorithm we tried to find out the length of the code
of the symbols used in the tree.
Keywords: Ternary tree, Huffman's algorithm,
Huffman encoding, prefix codes, code word length
Download Full-Text








