Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4859913

java.util.zip.Deflater should expose ZLIB's deflate (strm, flush)

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P5 P5
    • 7
    • 1.4.2
    • core-libs



      Name: nt126004 Date: 05/07/2003


      A DESCRIPTION OF THE REQUEST :
      ZLIB can flush its output with "int deflate (z_streamp strm, int flush)" (see http://www.gzip.org/zlib/manual.html#deflate). Java's ZLIB interface should be expanded by one method to provide access, in the classes java.util.zip.Deflater and for convenience java.util.zip.DeflaterOutputStream. The Z_FULL_FLUSH flag is key; Z_SYNC_FLUSH would be nice.


      JUSTIFICATION :
      For some data, better compression is obtained with more frequent flushes (more deflate "blocks"). See http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&th=fb3b2f6b1b1a988d&rnum=4 for a case in point. Flushing is also needed when random access is required.
      (Review ID: 185351)
      ======================================================================

            sherman Xueming Shen
            nthompsosunw Nathanael Thompson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: