aboutsummaryrefslogtreecommitdiff
path: root/src/compress/gzip/gunzip.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-09-30 12:31:18 -0400
committerRuss Cox <rsc@golang.org>2014-09-30 12:31:18 -0400
commita6abe22eb6f85f1df9d0f34da82b45ef11759815 (patch)
tree363ddbdb15c347da4b13c5b692ff2da15770ac6e /src/compress/gzip/gunzip.go
parent02395953064127f7dd54b238442eb71a2077ddb8 (diff)
downloadgo-a6abe22eb6f85f1df9d0f34da82b45ef11759815.tar.gz
go-a6abe22eb6f85f1df9d0f34da82b45ef11759815.zip
compress/*: note that NewReader may introduce buffering
Fixes #8309. LGTM=r R=golang-codereviews, r CC=golang-codereviews, iant https://golang.org/cl/147380043
Diffstat (limited to 'src/compress/gzip/gunzip.go')
-rw-r--r--src/compress/gzip/gunzip.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compress/gzip/gunzip.go b/src/compress/gzip/gunzip.go
index 4f398b194a..fc08c7a48c 100644
--- a/src/compress/gzip/gunzip.go
+++ b/src/compress/gzip/gunzip.go
@@ -77,7 +77,8 @@ type Reader struct {
}
// NewReader creates a new Reader reading the given reader.
-// The implementation buffers input and may read more data than necessary from r.
+// If r does not also implement io.ByteReader,
+// the decompressor may read more data than necessary from r.
// It is the caller's responsibility to call Close on the Reader when done.
func NewReader(r io.Reader) (*Reader, error) {
z := new(Reader)