Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

algorithm for adaptive huffmann coding

First we make a file


then we read it character by character
using each character that appears we make a tree
now how to make a tree.
check if the character already exists.
if yes, update its weight
if no add the character to the tree.
now as we update the weight, we may need to use the tree updation property or the
sibling property.
after completetion of the tree, we give codes to the tree nodes.
the tree traversal is in a particular fashion.
according to it we will give the codes.
npw according to the code we wil make a table.
a look up table.
using the look up table the tree is decoded.

You might also like