<div dir="ltr"><div>Hi Louis,</div><div><br></div><div>On first glance this looks easy to fix. I've filed a draft PR here (pending tests) <a href="https://github.com/openjdk/jdk/pull/17113">https://github.com/openjdk/jdk/pull/17113</a></div><div><br></div><div>-Archie<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 14, 2023 at 1:10 PM Louis Bergelson <<a href="mailto:louisb@broadinstitute.org" target="_blank">louisb@broadinstitute.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello.  This is my first time posting here so I apologize if this is the wrong forum.  I wanted to bring up an issue in the GZipInputStream which was first identified in 2011, confirmed as a bug, and then never resolved.  <div><br></div><div>When reading certain GZIP files from certain types of InputStreams the GZIPInputStream can misidentify the end of the stream and close early resulting in silently truncated data.</div><div><br></div><div>You can see the bug report which has a detailed description here: <a href="https://bugs.openjdk.org/browse/JDK-7036144" target="_blank">https://bugs.openjdk.org/browse/JDK-7036144</a></div><div><br></div><div>In short it comes down to incorrect use of the (quite confusing) InputStream.available() method to detect the end of stream.  This typically works fine with local files, but with network streams that might not have bytes available at any given moment it fails nondeterministically. </div><div><br></div><div>How could I go about getting this fixed?  I can contribute a patch or additional examples if necessary.  </div><div><br></div><div>Genomics data is typically encoded as block gzipped files, so this comes up regularly and causes a lot of confusion.  The workaround is to just not use the GZIPInput stream.  It seems like a core java class though so it would be nice if it worked.</div><div><br></div><div>Thank you,</div><div>Louis</div></div>
</blockquote></div><br clear="all"><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">Archie L. Cobbs<br></div>