A canonical Huffman code is a particular type of Huffman code with unique properties that allow it to be described in a very compact manner. An example of the Huffman tree for an input symbol set is shown in Fig. 1(a). Although the Huffman tree for a given symbol set is unique, such as Fig. 1(b), the code assigned to the symbol set is not unique. For example, three of all possible codes for the Huffman tree are shown in Fig. 1(a). In fact, there are 32 possible codes for the symbol set since we can arbitrarily assign 0 or 1 to each edge of the tree. For easy decoding, it is convenient to choose the encoding type three depicted in Fig. 1(a) as our resulting code in which symbols with consecutively increasing occurrence frequency are encoded as a consecutively increasing sequence of codewords.

Fig.1 Example of the Huffman tree and its three possible encodings.(a) Illustration example. (b) Huffman tree associated with (a).

Request source code for academic purpose REQUEST FORM or contact +91 7904568456 by whatsapp or, fee applicable.

SIMULATION VIDEO DEMO