Documentation ¶
Index ¶
- Constants
- Variables
- type Compressor
- func (d *Compressor) CompressType() protocol.CompressType
- func (d *Compressor) Decode(reader protocol.Reader) (err protocol.Error)
- func (d *Compressor) Encode(writer protocol.Writer) (err protocol.Error)
- func (d *Compressor) Len() (ln int)
- func (d *Compressor) Marshal() (data []byte)
- func (d *Compressor) MarshalTo(data []byte) []byte
- func (d *Compressor) MediaType() protocol.MediaType
- func (d *Compressor) ReadFrom(reader io.Reader) (n int64, err error)
- func (d *Compressor) Unmarshal(data []byte) (err protocol.Error)
- func (d *Compressor) UnmarshalFrom(data []byte) (remaining []byte, err protocol.Error)
- func (d *Compressor) WriteTo(w io.Writer) (totalWrite int64, err error)
- type Decompressor
- func (d *Decompressor) CompressType() protocol.CompressType
- func (d *Decompressor) Decode(reader protocol.Reader) (err protocol.Error)
- func (d *Decompressor) Encode(writer protocol.Writer) (err protocol.Error)
- func (d *Decompressor) Len() (ln int)
- func (d *Decompressor) Marshal() (data []byte)
- func (d *Decompressor) MarshalTo(data []byte) []byte
- func (d *Decompressor) MediaType() protocol.MediaType
- func (d *Decompressor) ReadFrom(reader io.Reader) (n int64, err error)
- func (d *Decompressor) Unmarshal(data []byte) (err protocol.Error)
- func (d *Decompressor) UnmarshalFrom(data []byte) (remaining []byte, err protocol.Error)
- func (d *Decompressor) WriteTo(w io.Writer) (totalWrite int64, err error)
Constants ¶
View Source
const ( ContentEncoding = "deflate" Extension = "zz" )
Variables ¶
View Source
var Deflate = deflate{ CompressType: compress.New(ContentEncoding, mediatype.New("domain/deflate.protocol.data-structure").SetFileExtension(Extension)), }
Functions ¶
This section is empty.
Types ¶
type Compressor ¶
type Compressor struct {
// contains filtered or unexported fields
}
func (*Compressor) CompressType ¶
func (d *Compressor) CompressType() protocol.CompressType
func (*Compressor) Decode ¶
func (d *Compressor) Decode(reader protocol.Reader) (err protocol.Error)
func (*Compressor) Encode ¶
func (d *Compressor) Encode(writer protocol.Writer) (err protocol.Error)
func (*Compressor) Marshal ¶
func (d *Compressor) Marshal() (data []byte)
func (*Compressor) MarshalTo ¶
func (d *Compressor) MarshalTo(data []byte) []byte
func (*Compressor) MediaType ¶
func (d *Compressor) MediaType() protocol.MediaType
func (*Compressor) UnmarshalFrom ¶
func (d *Compressor) UnmarshalFrom(data []byte) (remaining []byte, err protocol.Error)
type Decompressor ¶
type Decompressor struct {
// contains filtered or unexported fields
}
func (*Decompressor) CompressType ¶
func (d *Decompressor) CompressType() protocol.CompressType
func (*Decompressor) Decode ¶
func (d *Decompressor) Decode(reader protocol.Reader) (err protocol.Error)
func (*Decompressor) Encode ¶
func (d *Decompressor) Encode(writer protocol.Writer) (err protocol.Error)
func (*Decompressor) Len ¶
func (d *Decompressor) Len() (ln int)
Len return length of decompressed data
func (*Decompressor) Marshal ¶
func (d *Decompressor) Marshal() (data []byte)
func (*Decompressor) MarshalTo ¶
func (d *Decompressor) MarshalTo(data []byte) []byte
func (*Decompressor) MediaType ¶
func (d *Decompressor) MediaType() protocol.MediaType
func (*Decompressor) ReadFrom ¶
func (d *Decompressor) ReadFrom(reader io.Reader) (n int64, err error)
func (*Decompressor) UnmarshalFrom ¶
func (d *Decompressor) UnmarshalFrom(data []byte) (remaining []byte, err protocol.Error)
Click to show internal directories.
Click to hide internal directories.