Bob Lee wrote:
On Wed, Oct 21, 2009 at 1:02 PM, <xueming.s...@sun.com <mailto:xueming.s...@sun.com>> wrote:

    4206909: want java.util.zip to work for interactive use (Z_SYNC_FLUSH)
    Summary: Add sync_flush option into Deflater/DefalterOutputStream
    Reviewed-by: martin, alanb

    ! src/share/classes/java/util/zip/Deflater.java
    ! src/share/classes/java/util/zip/DeflaterOutputStream.java
    ! src/share/native/java/util/zip/Deflater.c
    + test/java/util/zip/InflateIn_DeflateOut.java


Should we use an enum for the flush strategies? It would help separate them from the compression strategies, and it would make the new method easier to use because it would be obvious at compile time which values you can pass in (as opposed to allowing any random int).

Bob,

There was discussion on whether or not the enum should be used instead of the raw integter tyep. Using an enum has clear advantage as you pointed but would be inconsistent with existing parameters (the strategy for example) . We settled
with the raw integer to prefer the local consistency.

Also, we could add a note about how alternate flush strategies can negatively affect compatibility with tools like WinZip.
What exactly is this incompatibility you refer here?

Sherman


Reply via email to