]> Cypherpunks repositories - gostls13.git/commitdiff
compress/gzip: clarify that Multistream gzip requires a ByteReader
authorJeremy Jay <jeremy@pbnjay.com>
Mon, 18 Feb 2019 03:33:28 +0000 (03:33 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 26 Feb 2019 23:02:40 +0000 (23:02 +0000)
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 <thebrokentoaster@gmail.com>
Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/compress/gzip/gunzip.go

index 85d52e85009cf081c7357349d07eb21cf78c5e71..924bce10b7c0cb1a901f47255afea99efcfc298a 100644 (file)
@@ -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) {