Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContentDecoder ¶
ContentDecoder removes a wrapper encoding from byte buffers.
func NewContentDecoder ¶
func NewContentDecoder(encoding string) (ContentDecoder, error)
NewContentDecoder returns a ContentDecoder for the encoding type.
type ContentEncoder ¶
ContentEncoder applies a wrapper encoding to byte buffers.
func NewContentEncoder ¶
func NewContentEncoder(encoding string) (ContentEncoder, error)
NewContentEncoder returns a ContentEncoder for the encoding type.
type GzipDecoder ¶
type GzipDecoder struct {
// contains filtered or unexported fields
}
GzipDecoder decompresses buffers with gzip compression.
func NewGzipDecoder ¶
func NewGzipDecoder() (*GzipDecoder, error)
type GzipEncoder ¶
type GzipEncoder struct {
// contains filtered or unexported fields
}
GzipEncoder compresses the buffer using gzip at the default level.
func NewGzipEncoder ¶
func NewGzipEncoder() (*GzipEncoder, error)
func (*GzipEncoder) Encode ¶
func (e *GzipEncoder) Encode(data []byte) ([]byte, error)
Encode will take data passed in and encode it with GZip
func (*GzipEncoder) SetLevel ¶
func (e *GzipEncoder) SetLevel(lvl int) error
SetLevel will change the gzip encoder compression level See https://golang.org/pkg/compress/gzip/#pkg-constants or a number between 0 and 9 0 being no compression 9 being best but slowest compression -1 is used to reset back to the default level
type IdentityDecoder ¶
type IdentityDecoder struct{}
IdentityDecoder is a null decoder that returns the input.
func NewIdentityDecoder ¶
func NewIdentityDecoder() *IdentityDecoder
type IdentityEncoder ¶
type IdentityEncoder struct{}
IdentityEncoder is a null encoder that applies no transformation.
func NewIdentityEncoder ¶
func NewIdentityEncoder() *IdentityEncoder
type SnappyEncoder ¶
type SnappyEncoder struct{}
SnappyEncoder compresses and decompresses the buffer using google's snappy encryption.
func NewSnappyDecoder ¶
func NewSnappyDecoder() (*SnappyEncoder, error)
NewSnappyDecoder returns a new snappy dencoder that can dencode []bytes previously encoded to []bytes.
func NewSnappyEncoder ¶
func NewSnappyEncoder() (*SnappyEncoder, error)
NewSnappyEncoder returns a new snappy encoder that can encode []bytes to google snappy []bytes.