Discussion Board
There are no previous messagesGo to the following message
Current Forum: Homework 4 - Huffman Trees (Part 1)
Date: Thu Oct 11 2001 10:28 pm
Author: Dozzi, Giancarlo <gdozzi@andrew.cmu.edu>
Subject: end of the compressed file?

So, presumably, numBytes() in FileBitReader returns the number of bytes in the entire file (including the header). So, how will I know where to start my counter (i.e., what position are we at in the file) after the header's been read?

for example:
int position = ??; //Isn't 0.
for (; position < in.numBytes() * 8; position++)
{
//Do stuff.
)

Also, should it be numBytes() * 8? If I'm reading bit by bit, I would guess this is the case.

Thanks,
Giancarlo Dozzi
Post response

There are no previous messagesGo to the following message
Current Thread Detail:
end of the compressed file?      Dozzi, Giancarlo      Thu Oct 11 2001 10:28 pm       
Re: end of the compressed file?      Maxim, Michael G.      Fri Oct 12 2001 11:50 am       
Re: end of the compressed file?      Ghosh, Debmallo S.      Fri Oct 12 2001 6:27 pm       

Back to previous screen