Documentation ¶
Overview ¶
The IMAP COMPRESS Extension, as defined in RFC 4978.
Index ¶
Constants ¶
View Source
const Capability = "COMPRESS"
The COMPRESS capability.
View Source
const Deflate = "DEFLATE"
The DEFLATE algorithm, defined in RFC 1951.
Variables ¶
View Source
var ErrAlreadyEnabled = errors.New("COMPRESS is already enabled")
ErrAlreadyEnabled is returned by Client.Compress when compression has already been enabled on the client.
Functions ¶
func NewExtension ¶
NewExtension creates a new COMPRESS server extension.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a COMPRESS client.
func (*Client) Compress ¶
Compress instructs the server to use the named compression mechanism for all commands and/or responses.
func (*Client) IsCompress ¶
IsCompressed checks if this client's connection is compressed.
type Command ¶
type Command struct { // Name of the compression mechanism. Mechanism string }
A COMPRESS command.
type NotSupportedError ¶
type NotSupportedError struct {
Mechanism string
}
A NotSupportedError is returned by Client.Compress when the provided compression mechanism is not supported.
func (NotSupportedError) Error ¶
func (err NotSupportedError) Error() string
Error implements error.
Click to show internal directories.
Click to hide internal directories.