Discussion Board
There are no previous messagesGo to the following message
Current Forum: Homework 4 - Huffman Trees (Part 1)
Date: Mon Oct 8 2001 10:34 pm
Author: Liu, William Y. <wyl@andrew.cmu.edu>
Subject: general clarification on FileBitReader/Writer classes

I already submitted an inquiry about using FileBitReader, but I am just generally unclear about how we should use FileBitReader and FileBitWriter.

For FileBitReader, should we just use readByte to get each character in byte form as an ASCII code value?

For FileBitWriter, how should we write the strings of 0's and 1's that represent the characters? Say that the Huffman encoding of some letter is 00110, how would I utilize FileBitWriter to send this bit sequence to the output file? Should I do write each bit one at a time? Also, the comments in the class mention something about an int storing bit sequences. How does that work?

Please enlighten me, if you can.
Post response

There are no previous messagesGo to the following message
Current Thread Detail:
general clarification on FileBitReader...      Liu, William Y.      Mon Oct 8 2001 10:34 pm       
Re: general clarification on FileBi...      Lee, Charles C.      Mon Oct 8 2001 11:13 pm       
Re: general clarification on Fil...      Cipriani, Jason A.      Mon Oct 8 2001 11:30 pm       
Re: general clarification on ...      Bortz, Andrew S.      Tue Oct 9 2001 12:28 am       
Re: general clarification ...      Cipriani, Jason A.      Wed Oct 10 2001 1:01 am       
Re: general clarificati...      Bortz, Andrew S.      Wed Oct 10 2001 11:04 am       
Re: general clarific...      Cipriani, Jason A.      Wed Oct 10 2001 12:45 pm       
Re: general clarific...      Cipriani, Jason A.      Wed Oct 10 2001 12:50 pm       
Re: general clari...      Cipriani, Jason A.      Wed Oct 10 2001 12:51 pm       

Back to previous screen