APIBrotli class abstract final

Brotli encoding/decoding, using package:brotli_fast.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Static Properties

encoder ↔ APIBrotliEncoder
The Brotli encoder used by encode and encodeAsync.
getter/setter pair

Static Methods

decode(Uint8List bytes, {int? maxOutputSize}) → Uint8List
Decodes the Brotli bytes.
decodeAsync(Uint8List bytes, {int? maxOutputSize}) → Future<Uint8List>
Same as decode, but decodes in the compressionIsolatePool (a background Isolate), for untrusted input: its decoded size can't be known from its length (a few bytes can decode to maxOutputSize).
defaultEncoder(Uint8List bytes, int quality) → Uint8List
The default encoder: brotliEncode.
encode(Uint8List bytes, {int quality = defaultQuality}) → Uint8List?
Encodes bytes with Brotli at quality (0 to 11).
encodeAsync(Uint8List bytes, {int quality = defaultQuality}) → FutureOr<Uint8List?>
Same as encode, but encodes in the compressionIsolatePool (a background Isolate) if bytes is large for quality (see isolateMinLength).
isolateMinLength(int quality) → int
The minimal length to encodeAsync in the compressionIsolatePool at quality: Brotli is pure Dart, and a slow encoding would block the event loop (and all the other requests of the isolate).

Constants

defaultQuality → const int
The default Brotli quality for dynamic responses.