Inflater.c bug?

pra at mint.se pra at mint.se
Thu Jan 28 01:17:51 PST 1999


On 27 Jan, Archie Cobbs wrote:
> pra at mint.se writes:
>> >> I have problems using GZIPInputStream. I always get an error message
>> >> like this:
>> >> java.lang.Error: oversubscribed dynamic bit lengths tree
>> >>         at java/util/zip/InflaterInputStream.read(72)
>> >>         at java/util/zip/GZIPInputStream.read(78)
>> >>         at java/io/InputStreamReader.read(53)
>> >>         at java/io/BufferedReader.refillBuffer(164)
>> >>         at java/io/BufferedReader.readLine(130)
>> >>         at TestIo.main(line unknown, pc 0x83e812d)
> 
> Could you try the following test? I'm wondering if it's a compression
> problem or possibly a problem with BufferedInputStream..
> 
> For example, this "gunzip" program works fine for me on
> several different test files...
> 
>     $ cat > gunzip.java
> 
>     import java.io.*;
>     import java.util.zip.*;
>     public class gunzip {
> 	    public static void main(String args[]) throws Exception {
> 		    int ch;
> 
> 		    Reader r = new InputStreamReader(
> 			    new GZIPInputStream(System.in));
> 		    while ((ch = r.read()) != -1)
> 			    System.out.print((char) ch);
> 		    System.out.flush();
> 	    }
>     }
>     ^D
>     $ jikes -nowarn gunzip.java
>     $ gzip < gunzip.java | kaffe gunzip | diff -q gunzip.java -
>     $ gzip < /etc/termcap | kaffe gunzip | diff -q /etc/termcap -
>     $ gzip --best < /kernel | kaffe gunzip | diff -q /kernel -
>     $ gzip --fast < /kernel | kaffe gunzip | diff -q /kernel -
> 
> Try it with some of your input files..
> 
> -Archie
> 

Hi, I did some testing and its still seems to be a compressionproblem.
And as Edouard stated eralier it seems to have a connection with gzip
saving the filename in the file:

[pra at pra jtest]$ gzip -c -n gunzip.java | ksjava gunzip
import java.io.*;
import java.util.zip.*;
public class gunzip {
  public static void main(String args[]) throws Exception {
    int ch;
    
    Reader r = new InputStreamReader(
                                     new GZIPInputStream(System.in));
    while ((ch = r.read()) != -1)
      System.out.print((char) ch);
    System.out.flush();
  }
}

[pra at pra jtest]$ gzip -c gunzip.java | ksjava gunzip
java.lang.Error: invalid stored block lengths
        at java/util/zip/InflaterInputStream.read(72)
        at java/util/zip/GZIPInputStream.read(78)
        at java/io/InputStreamReader.read(53)
        at java/io/Reader.read(46)
        at gunzip.main(9)

The -n switch supresses saving of the filename.

I do get a little different results depending on the content of the
file. When I do the same test on a logfile with realy long lines
(300-500 b) I get:

[pra at pra jtest]$ gzip -c mediumlog1.log | ksjava gunzip
java.lang.Error: oversubscribed dynamic bit lengths tree
        at java/util/zip/InflaterInputStream.read(72)
        at java/util/zip/GZIPInputStream.read(78)
        at java/io/InputStreamReader.read(53)
        at java/io/Reader.read(46)
        at gunzip.main(9)
Broken pipe


So now I now how to compress files to be inflated by kaffe. But the
problem is that I can not govern over all the gzip files I need to be
able to read.

Peter
-- 
--------------------------------------------------------
Peter Antman		AB Dagens Nyheter
System Developer	Gjörwellsgatan 30, 105 15 Sockholm
Email: pra at mint.se	WWW: http://www.dn.se/
Phone: 08-738 1338	Mobile: 070-675 3942 
--------------------------------------------------------



More information about the kaffe mailing list