Discussion:
Anybody have runtime errors decompressing??
(too old to reply)
Somik Behera
2005-10-02 21:44:37 UTC
Permalink
My program manages to compress a text file but I cant find out if it works
because it doesn't decompress it instead I get a java.io.EOFException
runtime exception.

Has anybody dealt with this problem? I am assuming my understanding of the
decodeOptAdaptive() method is lacking and thats causing the problem.

can anybody explain the pseudo code for decodeOptAdaptive()

-somik
Drake Dowsett
2005-10-02 22:07:09 UTC
Permalink
Post by Somik Behera
My program manages to compress a text file but I cant find out if it
works because it doesn't decompress it instead I get a
java.io.EOFException runtime exception.
Has anybody dealt with this problem? I am assuming my understanding of
the decodeOptAdaptive() method is lacking and thats causing the problem.
can anybody explain the pseudo code for decodeOptAdaptive()
-somik
My understanding was we wouldn't be able to actually decode anything,
since we wont have the header data.

Drake
Brandon Streiff
2005-10-02 22:10:40 UTC
Permalink
Post by Drake Dowsett
My understanding was we wouldn't be able to actually decode anything,
since we wont have the header data.
Drake
You know, I just noticed that, too...

But if you look in RevAdaptive.java, it seems to handle the input/output
of the header for us. That's what I understand the 'read counts'/'write
counts' stuff is for, at least...

I don't know yet, since my code currently works better for toasting
bread than compressing or decompressing files.

-- brandon
Brandon Streiff
2005-10-02 22:32:19 UTC
Permalink
Yum. Toast.
Powdered Toast Man!

-- brandon
Trevor Fountain
2005-10-02 22:31:36 UTC
Permalink
Yum. Toast.
Post by Brandon Streiff
Post by Drake Dowsett
My understanding was we wouldn't be able to actually decode anything,
since we wont have the header data.
Drake
You know, I just noticed that, too...
But if you look in RevAdaptive.java, it seems to handle the input/output
of the header for us. That's what I understand the 'read counts'/'write
counts' stuff is for, at least...
I don't know yet, since my code currently works better for toasting
bread than compressing or decompressing files.
-- brandon
Son Le
2005-10-02 21:58:00 UTC
Permalink
The code does a naive implementation of the headers. It writes 256 * 32
bits to the beginning of the file.
Post by Brandon Streiff
Post by Drake Dowsett
My understanding was we wouldn't be able to actually decode anything,
since we wont have the header data.
Drake
You know, I just noticed that, too...
But if you look in RevAdaptive.java, it seems to handle the input/output
of the header for us. That's what I understand the 'read counts'/'write
counts' stuff is for, at least...
I don't know yet, since my code currently works better for toasting
bread than compressing or decompressing files.
-- brandon
Jamie Hargrove
2005-10-03 05:26:44 UTC
Permalink
User-Agent: OSXnews .10/b
Xref: number1.nntp.dca.giganews.com utexas.class.cs337:385
Post by Drake Dowsett
Post by Somik Behera
My program manages to compress a text file but I cant find out if it
works because it doesn't decompress it instead I get a
java.io.EOFException runtime exception.
Has anybody dealt with this problem? I am assuming my understanding of
the decodeOptAdaptive() method is lacking and thats causing the problem.
can anybody explain the pseudo code for decodeOptAdaptive()
-somik
My understanding was we wouldn't be able to actually decode anything,
since we wont have the header data.
Drake
.
We do, in fact, have the header data as several people have observed. I
got the described error due to a couple bugs I had (I wasn't outputting
everything that I should have been). My suggestion is to change the
main function so that it "throws IOException" and comment out the
try/catch parts of the try/catch block at the bottom, so you can see exactly
where the exception is being thrown. Personally, I'm not sure why they
bothered with that block to begin with...-Jamie

Loading...