summaryrefslogtreecommitdiff
path: root/src/compress/lzw
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/lzw
parent02395953064127f7dd54b238442eb71a2077ddb8 (diff)
downloadgo-git-a6abe22eb6f85f1df9d0f34da82b45ef11759815.tar.gz
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/lzw')
-rw-r--r--src/compress/lzw/reader.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compress/lzw/reader.go b/src/compress/lzw/reader.go
index cd90c9c63a..0835bd8b90 100644
--- a/src/compress/lzw/reader.go
+++ b/src/compress/lzw/reader.go
@@ -222,6 +222,8 @@ func (d *decoder) Close() error {
// NewReader creates a new io.ReadCloser.
// Reads from the returned io.ReadCloser read and decompress data 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 ReadCloser when
// finished reading.
// The number of bits to use for literal codes, litWidth, must be in the