Discussion Board
Go to the previous messageGo to the following message
Current Forum: Homework 4 - Huffman Trees (Part 1)
Date: Wed Oct 10 2001 12:26 am
Author: Abeles, Peter J. <pja@andrew.cmu.edu>
Subject: Re: remaining bits

The way I was planing on handling this ( but doesnt seem to be a practicle solution in java) is to put in the header of the file a mask of the last byte (adds only 1 byte to the size) so that I can do this (lastByte & mask) to get the readable data. After looking through the documentation I cant find any way to change the position in the file you are writing to (which I guess is because its a stream). So that means I would have to calculate some how the last byte (or part of) that is going to be writen (right now I can only see the slow way of doing it) before I write the file. Unless someone knows how to do what I said above in a reasonable way I'm just going to slap a 32bit number in the beginning and bitch about how java sucks.
Post response

Go to the previous messageGo to the following message
Current Thread Detail:
remaining bits      Douglas, Keith      Sun Oct 7 2001 8:48 pm       
Re: remaining bits      Liu, Limin Angela      Sun Oct 7 2001 9:55 pm       
Re: remaining bits      Bortz, Andrew S.      Sun Oct 7 2001 10:12 pm       
Re: remaining bits      Lee, Charles C.      Sun Oct 7 2001 11:44 pm       
Re: remaining bits      Cipriani, Jason A.      Mon Oct 8 2001 3:44 pm       
Re: remaining bits      Jen, Cindy Dar-Shuan      Tue Oct 9 2001 2:30 am       
Re: remaining bits      Bortz, Andrew S.      Tue Oct 9 2001 12:26 pm       
Re: remaining bits      Cipriani, Jason A.      Wed Oct 10 2001 12:51 am       
Re: remaining bits      Abeles, Peter J.      Wed Oct 10 2001 12:26 am       
Re: remaining bits      Ghosh, Debmallo S.      Thu Oct 11 2001 1:45 pm       
Re: remaining bits      Cipriani, Jason A.      Mon Oct 8 2001 3:46 pm       
Re: remaining bits      Lee, Charles C.      Wed Oct 10 2001 12:46 am       
Re: remaining bits      Cipriani, Jason A.      Wed Oct 10 2001 12:56 am       
Re: remaining bits      Lee, Charles C.      Wed Oct 10 2001 5:04 pm       

Back to previous screen