Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompressLevel

func CompressLevel(scratch []byte, in []byte, level int) ([]byte, error)

    Compress compresses the given source data. Scratch can be passed to prevent prevent allocation. If it is too small, or if nil is passed, a new buffer will be allocated and returned. Arg level specifies the compression level. level < 0 means the default compression level.

    func Decompress

    func Decompress(scratch []byte, in []byte) ([]byte, error)

      Decompress uncompresses the given source data. Scratch can be passed to prevent allocation. If it is too small, or if nil is passed, a new buffer will be allocated and returned.

      func NewReader

      func NewReader(r io.Reader) (io.ReadCloser, error)

        NewReader creates a ReadCloser that uncompresses data. The returned object must be Closed after use.

        func NewWriter

        func NewWriter(w io.Writer) (io.WriteCloser, error)

          NewWriter creates a WriterCloser that compresses data. The returned object must be Closed after use.

          Types

          This section is empty.

          Source Files