flate

package
v0.0.0-...-4a740ba Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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) Len

func (d *Compressor) Len() (ln int)

Len return length of compressed data

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) ReadFrom

func (d *Compressor) ReadFrom(reader io.Reader) (n int64, err error)

func (*Compressor) Unmarshal

func (d *Compressor) Unmarshal(data []byte) (err protocol.Error)

func (*Compressor) UnmarshalFrom

func (d *Compressor) UnmarshalFrom(data []byte) (remaining []byte, err protocol.Error)

func (*Compressor) WriteTo

func (d *Compressor) WriteTo(w io.Writer) (totalWrite int64, err 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) Unmarshal

func (d *Decompressor) Unmarshal(data []byte) (err protocol.Error)

func (*Decompressor) UnmarshalFrom

func (d *Decompressor) UnmarshalFrom(data []byte) (remaining []byte, err protocol.Error)

func (*Decompressor) WriteTo

func (d *Decompressor) WriteTo(w io.Writer) (totalWrite int64, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL