Documentation
¶
Overview ¶
Package zlib provides zlib (RFC 1950) capabilities for byte slices.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidHeader = errors.New("zlib: invalid header")
ErrInvalidHeader indicates the input does not begin with a valid zlib wrapper.
Functions ¶
func Decompress ¶
Decompress returns decompressed bytes if b is zlib-wrapped, otherwise returns b unchanged.
func Detect ¶
Detect reports whether in begins with a plausible zlib stream header (RFC 1950 CMF/FLG).
func NewDecoder ¶
func NewDecoder(r io.Reader) reader.ReadCloserResetter
NewDecoder returns a resettable read closer for zlib streams.
func NewEncoder ¶
func NewEncoder(w io.Writer, level int) io.WriteCloser
NewEncoder returns a zlib writer; level is passed to compress/zlib.NewWriterLevel (-1 for default).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.