diff --git a/tiff/lzw/reader.go b/tiff/lzw/reader.go index 13c635a..371adb0 100644 --- a/tiff/lzw/reader.go +++ b/tiff/lzw/reader.go @@ -237,10 +237,13 @@ 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 -// range [2,8] and is typically 8. +// range [2,8] and is typically 8. It must equal the litWidth +// used during compression. func NewReader(r io.Reader, order Order, litWidth int) io.ReadCloser { d := new(decoder) switch order {