Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
multimedia Assignment1

multimedia Assignment1

Ratings: (0)|Views: 54|Likes:
Published by bandishti
huffman tree
huffman tree

More info:

Published by: bandishti on Apr 19, 2010
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





CS65: Assignment 1Mulitmedia CommunicationDue Date : May 13 to 15
Huffman coding is a scheme that assigns variable-length bit-codes to characters, such thatthe lengths of the codes depend on the frequencies of the characters in a typical message.As a result, encoded messages take less space (as compared to fixed-length encoding)since the letters that appear more frequently are assigned shorter codes. This is performedby first building a Huffman coding tree based on a given set of frequencies. From the tree,bit-codes for each character are determined and then used to encode a message. The treeis also used to decode an encoded message as it provides a way to determine which bitsequences translate back to a character.
Refer to the text for a more detailed discussion on Huffman coding trees.
Assignment:For this assignment, you will write three programs:
Given a file that contains the frequency distribution for all 26 letters of thealphabet plus four special characters (space, period, new-line, and end-of-message),buildtree will generate two files: a huffman coding tree file and a file containing bit-codeassignments.
Given the bit-code file generated by buildtree, and a text file containing amessage, encode will produce a binary _le that contains the encoded message.
Given the huffman coding tree file generated by buildtree, and an encodedmessage generated by encode, decode will reproduce the original message and output thatmessage to a text file.

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->