xmpp: mellium.im/xmpp/compress Index | Files

package compress

import "mellium.im/xmpp/compress"

Package compress implements XEP-0138: Stream Compression and XEP-0229: Stream Compression with LZW.

Index

Package Files

compression.go methods.go

Constants

const (
    NSFeatures = "http://jabber.org/features/compress"
    NSProtocol = "http://jabber.org/protocol/compress"
)

Namespaces used by stream compression.

func New Uses

func New(methods ...Method) xmpp.StreamFeature

New returns a new xmpp.StreamFeature that can be used to negotiate stream compression. The returned stream feature always supports ZLIB compression; other compression methods are optional.

type Method Uses

type Method struct {
    Name    string
    Wrapper func(io.ReadWriter) (io.ReadWriter, error)
}

Method is a stream compression method. Custom methods may be defined, but generally speaking the only supported methods will be those with names defined in the "Stream Compression Methods Registry" maintained by the XSF Editor: https://xmpp.org/registrar/compress.html

Since ZLIB is always supported, a Method is not defined for it.

var (
    // LZW implements stream compression using the Lempel-Ziv-Welch (DCLZ)
    // compressed data format.
    LZW Method = lzwMethod
)

Package compress imports 11 packages (graph). Updated 2018-11-14. Refresh now. Tools for package owners.