CompressionSettings class
Controls gzip compression of responses.
Compression is negotiated: a response is only ever compressed for a client
that asked for it with Accept-Encoding: gzip, so enabling this cannot
break a client that did not.
Constructors
-
CompressionSettings({bool enabled = true, int minBytes = 1024, Set<
String> mimeTypes = defaultMimeTypes}) -
const
- CompressionSettings.disabled()
-
const
Properties
- enabled → bool
-
Whether to compress at all.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
mimeTypes
→ Set<
String> -
Mime types worth compressing.
final
- minBytes → int
-
Responses smaller than this are sent uncompressed.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
allows(
String? mimeType) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
defaultMimeTypes
→ const Set<
String>