compression

package
Version: v0.0.0-...-4ca9756 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2015 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Methods = make(map[string]Compressor, 3)

Functions

func NewCompressHandler

func NewCompressHandler() *compressElement

func NewCompression

func NewCompression(opts features.Options) features.BasicFeature

func NewCompressionReadWriter

func NewCompressionReadWriter(s io.ReadWriteCloser, r io.ReadCloser, w io.WriteCloser) *compressedReadWriter

Types

type BaseCompressor

type BaseCompressor struct {
	XMLName    xml.Name `xml:"method"`
	MethodName string   `xml:",chardata"`
}

func (BaseCompressor) Name

func (bc BaseCompressor) Name() string

type CompressState

type CompressState struct {
	Compressed bool
	Config     map[string]CompressorConfig
}

func NewCompressState

func NewCompressState() *CompressState

type CompressionConfig

type CompressionConfig map[string]CompressorConfig

type CompressionSuccess

type CompressionSuccess struct {
	XMLName xml.Name `xml:"http://jabber.org/protocol/compress compressed"`
}

type Compressor

type Compressor interface {
	GetReader(io.Reader) (io.ReadCloser, error)
	GetWriter(io.Writer) io.WriteCloser
	Name() string
}

type CompressorConfig

type CompressorConfig struct {
	Level int `json:"level"`
}

type Flusher

type Flusher interface {
	Flush() error
}

type MethodNotSupportedError

type MethodNotSupportedError struct {
	XMLName xml.Name `xml:"http://jabber.org/protocol/compress failure"`
	Error   xml.Name `xml:"unsupported-method"`
}

type ProcessingFailedError

type ProcessingFailedError struct {
	XMLName xml.Name `xml:"http://jabber.org/protocol/compress failure"`
	Error   xml.Name `xml:"processing-failed"`
}

type SetupFailedError

type SetupFailedError struct {
	XMLName xml.Name `xml:"http://jabber.org/protocol/compress failure"`
	Error   xml.Name `xml:"setup-failed"`
}

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL