Name: yyT116575 Date: 01/10/2001
java version "1.1.8"
When inflating a compress data (cdata), with Netscape 4.7 or HotJava the
finished method does not return true. It works fine with MSIE5.5 and works also
when Java 2 RTE Std v1.3 is installed.
public void uncompress(int origsize, int csize)
{
data = new byte[origsize];
count = 0;
int offsetout = 0;
int offsetin = 0 ;
try {
do {
offsetin = inflater.getTotalIn();
offsetout = inflater.getTotalOut();
if (inflater.needsInput()) {
inflater.setInput(cdata, offsetin, csize-offsetin);
}
inflater.inflate(data, offsetout, origsize-offsetout);
offsetin = inflater.getTotalIn();
offsetout = inflater.getTotalOut();
System.out.println("offsetin "+offsetin+" offsetout "+offsetout+"finished "
+inflater.finished()+" need input "+inflater.needsInput()+" remain"+inflater.getRemaining());
} while ( ! inflater.finished() );
count = inflater.getTotalOut();
int remain = inflater.getRemaining();
System.out.println("Total uncompress "+count+" origsize "+origsize+" comp"
+csize+" total in "+offsetin+" remain "+remain);
}
catch ( Exception ex ) {
ex.printStackTrace();
}
inflater.end();
}
(Review ID: 114866)
======================================================================
- relates to
-
JDK-4311493 ADLER-32 does not work in java.util.zip.Inflater
- Closed
-
JDK-4192299 Inflater.getAdler() always returns the value of 1
- Closed