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
This commit is contained in:
Russ Cox 2014-09-30 12:30:31 -04:00
parent 5a1906dc47
commit 0239595306
1 changed files with 1 additions and 0 deletions

View File

@ -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 {