C program for Huffman's Algorithm
05:31Huffman's Algorithm
OUTPUT:
1)Create Huffman Tree
2)Encode a Message
3)Decode a message
4)Quit
Enter Your Choice : 1
Enter No. of alphabets :3
Enter alphabet :m
Enter frequency :2
Enter alphabet :a
Enter frequency :2
Enter alphabet :d
Enter frequency :1
Prefix codes :
a --- 0
d --- 10
m --- 11
1)Create Huffman Tree
2)Encode a Message
3)Decode a message
4)Quit
Enter Your Choice : 2
Enter a Message : madam
Encoded Message
11010011
1)Create Huffman Tree
2)Encode a Message
3)Decode a message
4)Quit
Enter Your Choice : 3
Enter an Encoded message : 11010011
Enter an Encoded message : 11010011
Decoded Message = madam
1)Create Huffman Tree
2)Encode a Message
3)Decode a message
4)Quit
Enter Your Choice : 4
0 comments: