This class provides support for general purpose decompression using
the popular ZLIB compression library. The ZLIB compression library
was initially developed as part of the PNG graphics standard and is
not protected by patents. It is fully described in RFCs 1950, 1951,
and 1952, which can be found at
http://info.internet.isi.edu:80/in-notes/rfc/files/
in the files rfc1950.txt (zlib format),
rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
Creates a new decompressor. If the parameter 'nowrap' is true then
the ZLIB header and checksum fields will not be used in order to
support the compression format used by both GZIP and PKZIP.
Parameters:
nowrap - if true then support GZIP compatible compression
public native synchronized void setDictionary(byte b[],
int off,
int len)
Sets the preset dictionary to the given array of bytes. Should be
called when inflate() returns 0 and needsDictionary() returns true
indicating that a preset dictionary is required. The method getAdler()
can be used to get the Adler-32 value of the dictionary needed.
Sets the preset dictionary to the given array of bytes. Should be
called when inflate() returns 0 and needsDictionary() returns true
indicating that a preset dictionary is required. The method getAdler()
can be used to get the Adler-32 value of the dictionary needed.
Returns the total number of bytes remaining in the input buffer.
This can be used to find out what bytes still remain in the input
buffer after decompression has finished.
public native synchronized int inflate(byte b[],
int off,
int len) throws DataFormatException
Uncompresses bytes into specified buffer. Returns actual number
of bytes uncompressed. A return value of 0 indicates that
needsInput() or needsDictionary() should be called in order to
determine if more input data or a preset dictionary is required.
In the later case, getAdler() can be used to get the Adler-32
value of the dictionary required.
Uncompresses bytes into specified buffer. Returns actual number
of bytes uncompressed. A return value of 0 indicates that
needsInput() or needsDictionary() should be called in order to
determine if more input data or a preset dictionary is required.
In the later case, getAdler() can be used to get the Adler-32
value of the dictionary required.
Submit a bug or feature - Version 1.1.8 of Java Platform API Specification
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1995-1999 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.