Discussion Board
Go to the previous messageThere are no next messages
Current Forum: Homework 4 - Huffman Trees (Part 1)
Date: Sun Oct 7 2001 3:17 pm
Author: Maxim, Michael G. <mmaxim@andrew.cmu.edu>
Subject: Re: the Huffman header

The Huffman header produced by the writeHeader() function writes the characters and their frequencies. When you read this header back in during decompression, you use these stored frequencies to rebuild the code table. So basically you read in the frequencies and construct the Huffman tree from them, and traverse that tree to get the reconstructed code table. Then start reading the compressed data and looking in the code table you generated to get the originial character.
Post response

Go to the previous messageThere are no next messages
Current Thread Detail:
the Huffman header      Juneja, Ajay K.      Sat Oct 6 2001 3:41 pm       
Re: the Huffman header      Maxim, Michael G.      Sun Oct 7 2001 3:17 pm       

Back to previous screen