gzip

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 (
	GZIPContentEncoding = "gzip"
	GZIPExtension       = "gzip"
)

Variables

View Source
var GZIP = gzip{
	CompressType: compress.New(GZIPContentEncoding, mediatype.New("domain/gzip.protocol.data-structure").SetFileExtension(GZIPExtension)),
}

Functions

This section is empty.

Types

type Compressor

type Compressor struct {
	// contains filtered or unexported fields
}

func (*Compressor) CompressType

func (c *Compressor) CompressType() protocol.CompressType

func (*Compressor) Decode

func (c *Compressor) Decode(reader protocol.Reader) (err protocol.Error)

func (*Compressor) Encode

func (c *Compressor) Encode(writer protocol.Writer) (err protocol.Error)

func (*Compressor) Len

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

Len return length of compressed data

func (*Compressor) Marshal

func (c *Compressor) Marshal() (data []byte)

func (*Compressor) MarshalTo

func (c *Compressor) MarshalTo(data []byte) []byte

func (*Compressor) MediaType

func (c *Compressor) MediaType() protocol.MediaType

func (*Compressor) ReadFrom

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

func (*Compressor) Unmarshal

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

func (*Compressor) UnmarshalFrom

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

func (*Compressor) WriteTo

func (c *Compressor) WriteTo(w io.Writer) (totalWrite int64, err error)

type Decompressor

type Decompressor struct {
	// contains filtered or unexported fields
}

func (*Decompressor) CompressType

func (c *Decompressor) CompressType() protocol.CompressType

func (*Decompressor) Decode

func (c *Decompressor) Decode(reader protocol.Reader) (err protocol.Error)

func (*Decompressor) Discard

func (c *Decompressor) Discard() (err protocol.Error)

func (*Decompressor) Encode

func (c *Decompressor) Encode(writer protocol.Writer) (err protocol.Error)

func (*Decompressor) Len

func (c *Decompressor) Len() (ln int)

Len return length of decompressed data

func (*Decompressor) Marshal

func (c *Decompressor) Marshal() (data []byte)

func (*Decompressor) MarshalTo

func (c *Decompressor) MarshalTo(data []byte) []byte

func (*Decompressor) MediaType

func (c *Decompressor) MediaType() protocol.MediaType

func (*Decompressor) ReadFrom

func (c *Decompressor) ReadFrom(reader io.Reader) (n int64, err error)

func (*Decompressor) Unmarshal

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

func (*Decompressor) UnmarshalFrom

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

func (*Decompressor) WriteTo

func (c *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