diff options
Diffstat (limited to 'libgo/go/compress/zlib/reader.go')
-rw-r--r-- | libgo/go/compress/zlib/reader.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libgo/go/compress/zlib/reader.go b/libgo/go/compress/zlib/reader.go index 4638a654842..f38ef5a885e 100644 --- a/libgo/go/compress/zlib/reader.go +++ b/libgo/go/compress/zlib/reader.go @@ -34,9 +34,14 @@ import ( const zlibDeflate = 8 -var ErrChecksum = errors.New("zlib checksum error") -var ErrHeader = errors.New("invalid zlib header") -var ErrDictionary = errors.New("invalid zlib dictionary") +var ( + // ErrChecksum is returned when reading ZLIB data that has an invalid checksum. + ErrChecksum = errors.New("zlib: invalid checksum") + // ErrDictionary is returned when reading ZLIB data that has an invalid dictionary. + ErrDictionary = errors.New("zlib: invalid dictionary") + // ErrHeader is returned when reading ZLIB data that has an invalid header. + ErrHeader = errors.New("zlib: invalid header") +) type reader struct { r flate.Reader |