a pure Java port of zlib, supporting the deflate and zlib compressed data formats.
Compared to Java's native implementation of deflate
and zlib
in java.util.zip, JZlib offers better control on flushing, which is needed for interactive use. Also it does no native methods, which often gives a better performance (java.util.zip uses native calls (JNI) to a zlib embedded in the VM).
JZlib is based on version 1.1.3. of zlib. The data formats are specified in RFC 1950 and RFC 1951 (deflate). JZlib does not directly support the gzip
or zip
data formats, but these can be implemented on top of the deflate
implementation in JZLib.
JZlib was created by JCraft Inc, and released as open source, under a BSD-like license. It can be used by jsch to optionally compress SSH connections.