RFR: 8374644: Regression in GZIPInputStream performance after JDK-7036144 [v2]

Jaikiran Pai jpai at openjdk.org
Thu Jan 8 12:13:49 UTC 2026


On Wed, 7 Jan 2026 15:18:16 GMT, Lance Andersen <lancea at openjdk.org> wrote:

>> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   use -1 to represent absence of a GZIP header, from readHeader() method
>
> src/java.base/share/classes/java/util/zip/GZIPInputStream.java line 82:
> 
>> 80:         usesDefaultInflater = true;
>> 81:         try {
>> 82:             readHeader(in, true);
> 
> Any consideration given to using an enum or constant to make it a bit clearer on what the true represents realizing there is a comment in the readHeader method.  Not a big deal either way

Hello Lance, I hadn't considered those options. Given that this is a private method being invoked only in 2 places, I picked the the trivial way to pass around the boolean. If it's OK I'll let it stay in this manner for this PR.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29092#discussion_r2672108417


More information about the core-libs-dev mailing list