THE ZEPINT NETWORK

programmer assist

Programming Programming XML Feeds

Programming Questions Programming Solutions Programming Articles

Computer programming (often simply programming) is the craft of implementing one or more interrelated abstract algorithms using a particular programming language to produce a concrete computer program. Programming has elements of art, science, mathematics, and engineering.

hufffman compression

DiggBlinkRedditDeliciousTechnorati

question by ashwingz | Hard

? Read in the text to be compressed from the keyboard. Assume it does not contain white space characters and any non-alphabetic characters.

? Calculate the frequency of each character and print out the frequency table :
D - 2
E - 5
W - 2
S - 1




? Then create the tree using the method explained below.

? Print the encoding table for each character as shown in Introduction. Use non-recursive post-order tree traversal.

? Compression: the encoding table and print out the compressed form of the input text.

? Decompression: Use the compressed form of the text you got in the previous step and expand it using the Huffmann tree created in step 3 (don?t use the encoding table for decompression). You should get the original input text as the output.


Post reply Subscriptions

Got a Programming Question?

Just Sign Up and ask the top Programming experts!

Search via Google

User Login

Email Address

Password

Programming Experts

Rank Expert Points
#1 martinig 500
This a list of the Top Programming experts, how many points do you have?

Leading Experts

Rank Expert Points
#1 frankzzsword 4600
#2 Bejaan 2900
#3 csfreak 1100
#4 Anurag 700
#5 keyvez 700
#6 nnarasimha 600
#7 Nakata 600
#8 martinig 600
#9 mastercomputers 400
#10 Huntress 150
#11 Adkron 150
#12 Yogesh 100
#13 lexxwern 100
#14 Mustan Khan 100
#15 poizn 100
This is a list of overall best performing experts, how many points do you have?