Name: rmT116609 Date: 02/05/2003
DESCRIPTION OF THE PROBLEM :
If using GZIP'ed streams to compress network traffic, after writing a request, the compressed data so far has to be flushed to the server. This should be done in a way that does not looses the complete compression dictionary. The zlib library underlying the java.util.zip package provides a flush method Z_SYNC_FLUSH for this kind of stream synchronization. But the JNI implementation of the JDK only uses Z_FINISH which completely reset the dictionary or Z_NO_FLUSH.
EXPECTED VERSUS ACTUAL BEHAVIOR :
I expect a way to synchronize/flush a GZIP'ed stream with its decompressor without loosing the complete compression dictionary.
(Review ID: 166846)
CAP member reported this issue again and would like have it address if possibel -
Workaround usually works, however, if no more bytes happen to be output
after this is called (and this is used in cases of dynamic output) then
sometimes an extra null(0) byte will appear at the end of the uncompressed output.
which is clearly unacceptable.
The lack of this functionality and lack of a reliable workaround are conspiring
to cause us no end of trouble here. GzipOutputStream.flush() should do a real zlib
flush. The community hasa been waiting over 10 years for this simple work.