[jdev] Zlib compression

Stephen Pendleton spendleton at movsoftware.com
Thu Dec 1 11:20:25 CST 2005

Taking a look at an example zlib implementation's header file there a few
items that control the behavior of the zlib compressor/decompressor:

#define Z_NO_COMPRESSION         0
#define Z_BEST_SPEED             1
#define Z_BEST_COMPRESSION       9
/* compression levels */

#define Z_FILTERED            1
#define Z_HUFFMAN_ONLY        2
/* compression strategy; see deflateInit2() below for details */

#define Z_BINARY   0
#define Z_ASCII    1
#define Z_UNKNOWN  2
/* Possible values of the data_type field */

#define Z_DEFLATED   8
/* The deflate compression method (the only one supported in this version)

As you can see, you can specify a compression level, a compression method,
and a deflation method. Since the stream compression JEP doesn't specify the
inclusion of feature negotiations, how are implementors handling this?
Currently I use default values for the level and compression/decompression
methods and it works fine. 

I personally think we should do feature negotiation, but if we choose not to
we should specify in the JEP what the supported values should be.


More information about the JDev mailing list