diff options
author | Russ Cox <rsc@golang.org> | 2014-09-30 12:30:31 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2014-09-30 12:30:31 -0400 |
commit | 8e21ec6e36e89dc17698358ce620194fc09c898a (patch) | |
tree | 44e3825a91b097ce366efd0f35148534c0dbfd18 /src/compress | |
parent | bd355a5bfe3a23e806349fd625070d3e034b541d (diff) | |
download | go-8e21ec6e36e89dc17698358ce620194fc09c898a.tar.gz |
compress/zlib: mention that NewReaderDict can return ErrDictionary
Fixes issue 7935.
LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews, ruiu
https://codereview.appspot.com/147390043
Diffstat (limited to 'src/compress')
-rw-r--r-- | src/compress/zlib/reader.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compress/zlib/reader.go b/src/compress/zlib/reader.go index 9e1aafda9..e1191816d 100644 --- a/src/compress/zlib/reader.go +++ b/src/compress/zlib/reader.go @@ -61,6 +61,7 @@ func NewReader(r io.Reader) (io.ReadCloser, error) { // NewReaderDict is like NewReader but uses a preset dictionary. // NewReaderDict ignores the dictionary if the compressed data does not refer to it. +// If the compressed data refers to a different dictionary, NewReaderDict returns ErrDictionary. func NewReaderDict(r io.Reader, dict []byte) (io.ReadCloser, error) { z := new(reader) if fr, ok := r.(flate.Reader); ok { |