Versions in this module Expand all Collapse all v1 v1.0.0 Jul 28, 2021 Changes in this version + type Codec interface + type Compressor interface + Compress func([]byte) ([]byte, error) + Decompress func([]byte) ([]byte, error) + func NewGzipCompressor() Compressor + func NewS2Compressor() Compressor + type DefaultCompressor struct + func (c *DefaultCompressor) Compress(data []byte) ([]byte, error) + func (c *DefaultCompressor) Decompress(data []byte) ([]byte, error) + type GobCodec struct + func NewGobCodec(compressor Compressor) *GobCodec + func (c *GobCodec) Marshal(value interface{}) ([]byte, error) + func (c *GobCodec) Unmarshal(byt []byte, ptr interface{}) (err error) + type JsonCodec struct + func NewJsonCodec(compressor Compressor) *JsonCodec + func (c *JsonCodec) Marshal(value interface{}) ([]byte, error) + func (c *JsonCodec) Unmarshal(byt []byte, ptr interface{}) (err error) + type Marshaler interface + Marshal func(interface{}) ([]byte, error) + type MsgPackCodec struct + func NewMsgPackCodec(compressor Compressor) *MsgPackCodec + func (c *MsgPackCodec) Marshal(value interface{}) ([]byte, error) + func (c *MsgPackCodec) Unmarshal(byt []byte, ptr interface{}) (err error) + type Unmarshaler interface + Unmarshal func([]byte, interface{}) error