Current Forum: Homework 4 - Huffman Trees (Part 1) |
Date: Mon Oct 8 2001 10:28 pm |
Author: Liu, William Y. <wyl@andrew.cmu.edu> |
Subject: reading in the data file |
|
|
I have a question about reading in the data file to be compressed. I understand that on the first pass through the data file, all characters present in the file and their frequencies should be recorded. That information is necessary to construct the Huffman Tree.
But how do I use the FileBitReader class to read in each character on the first pass? Do I read a byte at a time and consider each byte to be the ASCII representation of a character? So instead of reading in characters, am I actually reading in their ASCII codes instead?
|
|