CompressionOptions class

Options controlling compression in a WebSocket.

A CompressionOptions instance can be passed to WebSocket.connect, or used in other similar places where WebSocket compression is configured.

In most cases the default compressionDefault is sufficient, but in some situations, it might be desirable to use different compression parameters, for example to preserve memory on small devices.

Constructors

CompressionOptions({bool clientNoContextTakeover: false bool serverNoContextTakeover: false int clientMaxWindowBits, int serverMaxWindowBits, bool enabled: true })
const

Properties

clientMaxWindowBits int
The maximal window size bit count requested by the client. [...]
final
clientNoContextTakeover bool
Whether the client will reuse its compression instances.
final
enabled bool
Whether WebSocket compression is enabled. [...]
final
serverMaxWindowBits int
The maximal window size bit count requested by the server. [...]
final
serverNoContextTakeover bool
Whether the server will reuse its compression instances.
final
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited

Constants

compressionDefault → const CompressionOptions
Default WebSocket compression configuration. [...]
compressionOff → const CompressionOptions
No-compression configuration. [...]
const CompressionOptions(enabled: false)
DEFAULT → const CompressionOptions
@Deprecated("Use compressionDefault instead")
compressionDefault
OFF → const CompressionOptions
@Deprecated("Use compressionOff instead")
compressionOff