dart / 2 / dart-io / compressionoptions-class.html

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?
final
The maximal window size bit count requested by the client.
clientNoContextTakeover → bool
final
Whether the client will reuse its compression instances.
enabled → bool
final
Whether WebSocket compression is enabled.
hashCode → int
read-only, inherited
The hash code for this object.
runtimeType → Type
read-only, inherited
A representation of the runtime type of the object.
serverMaxWindowBits → int?
final
The maximal window size bit count requested by the server.
serverNoContextTakeover → bool
final
Whether the server will reuse its compression instances.

Methods

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

Operators

operator ==(Object other) → bool
inherited
The equality operator.

Constants

compressionDefault → const CompressionOptions
Default WebSocket compression configuration.
compressionOff → const CompressionOptions
No-compression configuration.
CompressionOptions(enabled: false)

© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.18.5/dart-io/CompressionOptions-class.html