From: Jeremy Jay Date: Mon, 18 Feb 2019 03:33:28 +0000 (+0000) Subject: compress/gzip: clarify that Multistream gzip requires a ByteReader X-Git-Tag: go1.13beta1~1372 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b325799cad7a12abb6964b5dd2a6e5b0e913413e;p=gostls13.git compress/gzip: clarify that Multistream gzip requires a ByteReader Change-Id: Ib24778f3172c011e6a39ee65dce8764f3cc911ea GitHub-Last-Rev: 9c617c1e60ac48db67e26e64ce240d3845c0e6ac GitHub-Pull-Request: golang/go#30284 Reviewed-on: https://go-review.googlesource.com/c/162999 Reviewed-by: Joe Tsai Run-TryBot: Joe Tsai TryBot-Result: Gobot Gobot --- diff --git a/src/compress/gzip/gunzip.go b/src/compress/gzip/gunzip.go index 85d52e8500..924bce10b7 100644 --- a/src/compress/gzip/gunzip.go +++ b/src/compress/gzip/gunzip.go @@ -126,8 +126,8 @@ func (z *Reader) Reset(r io.Reader) error { // can be useful when reading file formats that distinguish individual gzip // data streams or mix gzip data streams with other data streams. // In this mode, when the Reader reaches the end of the data stream, -// Read returns io.EOF. If the underlying reader implements io.ByteReader, -// it will be left positioned just after the gzip stream. +// Read returns io.EOF. The underlying reader must implement io.ByteReader +// in order to be left positioned just after the gzip stream. // To start the next stream, call z.Reset(r) followed by z.Multistream(false). // If there is no next stream, z.Reset(r) will return io.EOF. func (z *Reader) Multistream(ok bool) {