Versions in this module Expand all Collapse all v1 v1.10.0 Feb 16, 2020 Changes in this version + const MaxBlockSize + var ErrCRC = errors.New("s2: corrupt input, crc mismatch") + var ErrCorrupt = errors.New("s2: corrupt input") + var ErrTooLarge = errors.New("s2: decoded block is too large") + var ErrUnsupported = errors.New("s2: unsupported input") + func ConcatBlocks(dst []byte, blocks ...[]byte) ([]byte, error) + func Decode(dst, src []byte) ([]byte, error) + func DecodedLen(src []byte) (int, error) + func Encode(dst, src []byte) []byte + func EncodeBetter(dst, src []byte) []byte + func EncodeSnappy(dst, src []byte) []byte + func MaxEncodedLen(srcLen int) int + type Reader struct + func NewReader(r io.Reader) *Reader + func (r *Reader) Read(p []byte) (int, error) + func (r *Reader) Reset(reader io.Reader) + func (r *Reader) Skip(n int64) error + type Writer struct + func NewWriter(w io.Writer, opts ...WriterOption) *Writer + func (w *Writer) Close() error + func (w *Writer) EncodeBuffer(buf []byte) (err error) + func (w *Writer) Flush() error + func (w *Writer) ReadFrom(r io.Reader) (n int64, err error) + func (w *Writer) Reset(writer io.Writer) + func (w *Writer) Write(p []byte) (nRet int, errRet error) + type WriterOption func(*Writer) error + func WriterBetterCompression() WriterOption + func WriterBlockSize(n int) WriterOption + func WriterConcurrency(n int) WriterOption + func WriterPadding(n int) WriterOption