> The class `GZIPOutputStream` extends `DeflaterOutputStream`, which is logical 
> because the GZIP encoding is based on ZLIB "deflate" encoding.
> 
> However, while `DeflaterOutputStream` provides constructors that take a 
> custom `Deflater` argument supplied by the caller, `GZIPOutputStream` has no 
> such constructors.
> 
> As a result, it's not possible to do entirely reasonable customization, such 
> as configuring a `GZIPOutputStream` for a non-default compression level.
> 
> This change adds a new `GZIPOutputStream` constructor that accepts a custom 
> `Deflater`, and also adds a basic unit test for it and all of the other 
> `GZIPOutputStream` constructors, based on the existing test 
> `BasicGZIPInputStreamTest.java` which does the same thing for 
> `GZIPInputStream`.

Archie Cobbs has updated the pull request with a new target base due to a merge 
or a rebase. The incremental webrev excludes the unrelated changes brought in 
by the merge/rebase. The pull request contains six additional commits since the 
last revision:

 - Bump copyright year to 2025.
 - Merge branch 'master' into JDK-4452735
 - Address review comments.
 - Merge branch 'master' into JDK-4452735
 - Merge branch 'master' into JDK-4452735
 - Add a GZIPOutputStream() constructor that takes a Deflator.

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/20226/files
  - new: https://git.openjdk.org/jdk/pull/20226/files/ab16e47d..b3a40b1c

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=20226&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=20226&range=01-02

  Stats: 172062 lines in 5031 files changed: 118773 ins; 36525 del; 16764 mod
  Patch: https://git.openjdk.org/jdk/pull/20226.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20226/head:pull/20226

PR: https://git.openjdk.org/jdk/pull/20226

Reply via email to