From: Russ Cox Date: Tue, 30 Sep 2014 16:30:31 +0000 (-0400) Subject: compress/zlib: mention that NewReaderDict can return ErrDictionary X-Git-Tag: go1.4beta1~237 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=02395953064127f7dd54b238442eb71a2077ddb8;p=gostls13.git compress/zlib: mention that NewReaderDict can return ErrDictionary Fixes #7935. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews, ruiu https://golang.org/cl/147390043 --- diff --git a/src/compress/zlib/reader.go b/src/compress/zlib/reader.go index 9e1aafda9b..e1191816d6 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 {