Documentation ¶
Overview ¶
Package bytes provides functions for decompressing byte streams.
Index ¶
- func ReadBytes(b []byte, alg string, dict []byte) (io.ReadCloser, error)
- func ReadFlateBytes(b []byte, dict []byte) flate.ReadResetCloser
- func ReadGzipBytes(b []byte, multistream bool) (gzip.ReadResetCloser, error)
- func ReadSnappyBytes(b []byte) snappy.ReadResetter
- func ReadZipBytes(b []byte) (io.ReadCloser, error)
- func ReadZlibBytes(b []byte, dict []byte) (zlib.ReadResetCloser, error)
- type ByteReadScanner
- type ByteReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadBytes ¶
ReadBytes returns a ByteReader for a byte array with a given compression. alg may be "flate", "gzip", "none", "snappy", or "zlib".
func ReadFlateBytes ¶
func ReadFlateBytes(b []byte, dict []byte) flate.ReadResetCloser
ReadFlateBytes returns a reader for reading flate bytes from an input array. Wraps the "compress/flate" package.
func ReadGzipBytes ¶
func ReadGzipBytes(b []byte, multistream bool) (gzip.ReadResetCloser, error)
ReadGzipBytes returns a reader for reading gzip bytes from an input array. Wraps the "compress/gzip" package.
func ReadSnappyBytes ¶
func ReadSnappyBytes(b []byte) snappy.ReadResetter
ReadSnappyBytes returns a reader for an input of snappy-compressed bytes, and an error if any.
func ReadZipBytes ¶
func ReadZipBytes(b []byte) (io.ReadCloser, error)
ReadZipBytes returns a reader for reading from zip-compressed bytes.
func ReadZlibBytes ¶
func ReadZlibBytes(b []byte, dict []byte) (zlib.ReadResetCloser, error)
ReadZlibBytes returns a reader for reading zlib bytes from an input slice. Wraps the "compress/zlib" package.
Types ¶
type ByteReadScanner ¶
type ByteReadScanner interface { io.Reader io.ByteReader io.ByteScanner }
func ReadPlainBytes ¶
func ReadPlainBytes(b []byte) ByteReadScanner
ReadPlainBytes returns a reader for reading the bytes from an input array, and an error if any.
type ByteReader ¶
type ByteReader interface { io.Reader io.ByteReader }