On Wed, 29 Apr 2026 14:17:12 GMT, Lance Andersen <[email protected]> wrote:

>> Jaikiran Pai has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   refer to section 2.2 of the RFC
>
> src/java.base/share/classes/java/util/zip/GZIPInputStream.java line 43:
> 
>> 41:  * a header, followed by data that is compressed using the {@code 
>> deflate} algorithm, and then
>> 42:  * a trailer. The members simply appear one after another in the file, 
>> with no additional
>> 43:  * information before, between, or after them. An input stream 
>> consisting of more than one member
> 
> Should the above reference 2.2 of gzip spec?
> 
> 2.2. File format
> 
>       A gzip file consists of a series of "members" (compressed data
>       sets).  The format of each member is specified in the following
>       section.  The members simply appear one after another in the file,
>       with no additional information before, between, or after them.

I've updated this text to now say:


 * <h2><a id="gzip_file_format">GZIP file format</a></h2>
 * Section 2.2 of RFC-1952 specifies GZIP file format as consisting of a series 
of "members"
 * (compressed data sets). Each member consists of a header, followed by data 
that is compressed
 * using the {@code deflate} algorithm, and then a trailer. The members simply 
appear one after
 * another in the file, with no additional information before, between, or 
after them.
 * <p>
 * A stream consisting of more than one member is commonly referred to as 
concatenated GZIP stream.
 * This class is capable of reading a concatenated GZIP stream.


Does this read better?

> src/java.base/share/classes/java/util/zip/GZIPInputStream.java line 137:
> 
>> 135:     /**
>> 136:      * Creates a new input stream with a default buffer size. The given 
>> {@code in}
>> 137:      * stream is treated as containing {@linkplain ##gzip_file_format 
>> GZIP format data}.
> 
> Do we need to restate the stream is expecting GZIP formatted data as I think 
> if state this in the file format section it might not need repeating?

Removed this sentence from the 2 constructors.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30925#discussion_r3168198888
PR Review Comment: https://git.openjdk.org/jdk/pull/30925#discussion_r3168204654

Reply via email to