On Thu, May 13, 2010 at 00:11, Xueming Shen <[email protected]> wrote: > Martin Buchholz wrote: >> >> On Wed, May 12, 2010 at 23:46, Xueming Shen <[email protected]> >> wrote: >> >>> >>> Thanks for the review. >>> >>> The Z_SYNC_FLUSH is supposed to fully replace the Z_PARTIAL_FLUSH. >>> >>> We concluded last round that Z_SYNC_FLUSH is enough for the "high-level" >>> DOS, as well as the GZIPOS, use Deflater directly if more needed. I hope >>> you >>> are not suggesting we go back to redo the flush to int. >>> >> >> Maybe we should. >> >> http://www.jcraft.com/jzlib/ >> >> """ >> To implement this functionality, the Z_PARTIAL_FLUSH mode of zlib must >> be used, however JDK does not permit us to do so. It seems that this >> problem has been well known and some people have already reported to >> JavaSoft's BugParade(for example, BugId:4255743), but any positive >> response has not been returned from JavaSoft, so this problem will not >> be solved forever. This is our motivation to hack JZlib. >> """ >> >> > > I thought I had closed this one (#4255743) as the dup of #4206909. > > This is actually why we did 4206909 and now doing #4813885. With the fix for > #4206909, you no > longer need jzlib:-) Yes, we use Z_SYNC_FLUSH, not Z_PARTIAL_FLUSH because > the later is going > away, replaced by Z_SYNC_FLUSH. They are the same thing.
I can't say that I really understand the difference, but... The description of the different flush modes in zlib.h clearly distinguishes between Z_SYNC_FLUSH and Z_PARTIAL_FLUSH. Z_PARTIAL_FLUSH is clearly undeprecated in zlib 1.2.5 """- Remove deprecation comment on Z_PARTIAL_FLUSH (it stays)""" So I remain unconvinced, but I'm not going to push on this any more, or at least not until I understand it better. Martin > So with #4206909 and #4813885 you can now sync_flush the GZIPOutputStream > and > DeflaterOutputStream, as needed by the "functionality" mentioned in jzlib. > > Sherman > > >
