Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrDstTooSmall = errors.New("destination buffer too small")
var ( // ErrMalformed is returned by the decoder when the xerial framing // is malformed ErrMalformed = errors.New("malformed xerial framing") )
Functions ¶
func Decode ¶
Decode decodes snappy data whether it is traditional unframed or includes the xerial framing format.
func DecodeCapped ¶
DecodeCapped decodes snappy data whether it is traditional unframed or includes the xerial framing format into the specified `dst`. It is assumed that the entirety of `dst` including all capacity is available for use by this function. If `dst` is nil *or* insufficiently large to hold the decoded `src`, ErrDstTooSmall is returned.
func DecodeInto ¶
DecodeInto decodes snappy data whether it is traditional unframed or includes the xerial framing format into the specified `dst`. It is assumed that the entirety of `dst` including all capacity is available for use by this function. If `dst` is nil *or* insufficiently large to hold the decoded `src`, new space will be allocated. To never allocate bigger destination, use DecodeCapped.
func Encode ¶
Encode *appends* to the specified 'dst' the compressed 'src' in xerial framing format. If 'dst' does not have enough capacity, then a new slice will be allocated. If 'dst' has non-zero length, then if *must* have been built using this function.
func EncodeBetter ¶
EncodeBetter *appends* to the specified 'dst' the compressed 'src' in xerial framing format. If 'dst' does not have enough capacity, then a new slice will be allocated. If 'dst' has non-zero length, then if *must* have been built using this function.
Types ¶
This section is empty.