Name: rmT116609 Date: 02/06/2002
FULL PRODUCT VERSION :
java version "1.4.0-rc"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-rc-b91)
Java HotSpot(TM) Client VM (build 1.4.0-rc-b91, mixed mode)
A DESCRIPTION OF THE PROBLEM :
The documentation for the "size" parameter for the constructor of both java.util.zip.GZIPOutputStream and java.util.zip.DeflaterOutputStream is not clear. At first glance, it appears that good values are in the numbers of kilobytes and that it effectively obviates the need to have an underlying BufferedOutputStream.
That is not the case. After source code inspection, I saw that the default value for GZIPOutputStream is only 512 and that's because this buffer is essentially flushed at least once on every call to a write() method. It seems to me that it is not worth configuring this parameter. At a minimum the parameter should be make it clear that using this OutputStream does not obviate the need for BufferedOutputStream and that the default value is just fine.
(Review ID: 139109)