# README
snappy
The Snappy compression format in the Go programming language.
This is a drop-in replacement for github.com/golang/snappy
.
It provides a full, compatible replacement of the Snappy package by simply changing imports.
See Snappy Compatibility in the S2 documentation.
"Better" compression mode is used. For buffered streams concurrent compression is used.
For more options use the s2 package.
usage
Replace imports github.com/golang/snappy
with github.com/klauspost/compress/snappy
.
# Functions
Decode returns the decoded form of src.
DecodedLen returns the length of the decoded block.
Encode returns the encoded form of src.
MaxEncodedLen returns the maximum length of a snappy block, given its uncompressed length.
NewBufferedWriter returns a new Writer that compresses to w, using the framing format described at https://github.com/google/snappy/blob/master/framing_format.txt
The Writer returned buffers writes.
NewReader returns a new Reader that decompresses from r, using the framing format described at https://github.com/google/snappy/blob/master/framing_format.txt.
NewWriter returns a new Writer that compresses to w.
# Variables
ErrCorrupt reports that the input is invalid.
ErrTooLarge reports that the uncompressed length is too large.
ErrUnsupported reports that the input isn't supported.