BrotliCodec class final
Brotli Codec with configurable encoder/decoder options.
const codec = BrotliCodec();
final compressed = codec.encode(utf8.encode('hello'));
final text = codec.decodeToString(compressed);
Constructors
- BrotliCodec({BrotliEncodeOptions encodeOptions = const BrotliEncodeOptions(), BrotliDecodeOptions decodeOptions = const BrotliDecodeOptions()})
-
const
Properties
- decodeOptions → BrotliDecodeOptions
-
Options used by decode/decoder.
final
-
decoder
→ Converter<
List< int> , List<int> > -
Returns the decoder of
this, converting fromTtoS.no setteroverride - encodeOptions → BrotliEncodeOptions
-
Options used by encode/encoder.
final
-
encoder
→ Converter<
List< int> , List<int> > -
Returns the encoder from
StoT.no setteroverride - hashCode → int
-
The hash code for this object.
no setterinherited
-
inverted
→ Codec<
List< int> , List<int> > -
Inverts
this.no setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
decode(
List< int> encoded) → List<int> -
Decodes
encodeddata.override -
decodeBytes(
Uint8List input) → Uint8List -
Decodes
inputand returns the backing bytes directly. -
decodeToString(
List< int> input, {bool allowMalformed = false}) → String - Decodes a Brotli-compressed UTF-8 string.
-
encode(
List< int> input) → List<int> -
Encodes
input.override -
encodeBytes(
Uint8List input) → Uint8List -
Encodes
inputand returns the backing bytes directly. -
encodeString(
String input) → Uint8List -
UTF-8-encodes
inputand compresses it. -
fuse<
R> (Codec< List< other) → Codec<int> , R>List< int> , R> -
Fuses
thiswithother.inherited -
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