BrotliCodec class

The BrotliCodec encodes/decodes raw bytes using the Brotli algorithm

Inheritance

Constructors

BrotliCodec({int level = BrotliOption.defaultLevel, int mode = BrotliOption.defaultMode, int windowBits = BrotliOption.defaultWindowBits, int? blockBits, int? postfixBits, bool literalContextModeling = true, int sizeHint = 0, bool largeWindow = false, int? directDistanceCodeCount, bool ringBufferReallocation = true, int inputBufferLength = CodecBufferHolder.autoLength, int outputBufferLength = CodecBufferHolder.autoLength})
Construct an BrotliCodec that is configured with the following parameters.

Properties

bindingVersion BrotliVersion
Return the base binding version this binding code was developed for.
no setter
blockBits int?
Recommended input block size. Encoder may reduce this value, e.g. if the input is much smalltalk than the input block size. Range: BrotliOption.minBlockBits..BrotliOption.maxBlockBits. Default: nil (dynamically computed).
final
decoder Converter<List<int>, List<int>>
Return the brotli decoder configured implementation.
no setteroverride
decoderVersion BrotliVersion
Return the decoder library version.
no setter
directDistanceCodeCount int?
Recommended number of direct distance codes. Encoder may change this value. Default: nil (dynamically computed).
final
encoder Converter<List<int>, List<int>>
Return the brotli encoder configured implementation.
no setteroverride
encoderVersion BrotliVersion
Return the encoder library version.
no setter
hashCode int
The hash code for this object.
no setterinherited
inputBufferLength int
Length in bytes of the buffer used for input data.
final
inverted Codec<List<int>, List<int>>
Inverts this.
no setterinherited
largeWindow bool
Flag that determines if "Large Window Brotli" is used. If set to true, then the LZ-Window can be set up to 30-bits but the result will not be RFC7932 compliant. Default: false
final
level int
The compression-level or quality can be set in the range of BrotliOption.minLevel..BrotliOption.maxLevel. The higher the level, the slower the compression. Default: BrotliOption.defaultLevel
final
literalContextModeling bool
Flag that affects usage of "literal context modeling" format feature. This flag is a "decoding-speed vs compression ratio" trade-off. Default: true
final
mode int
Tune the encoder for a specific input. The allowable values are: BrotliOption.fontMode, BrotliOption.genericMode, BrotliOption.textMode, BrotliOption.defaultMode. Default: BrotliOption.defaultMode.
final
outputBufferLength int
Length in bytes of the buffer used for processed output data.
final
postfixBits int?
Recommended number of postfix bits. Encode may change this value. Range: BrotliOption.minPostfixBits..BrotliOption.maxPostfixBits Default: nil (dynamically computed).
final
ringBufferReallocation bool
Flag the determines if "canny" ring buffer allocation is enabled. Ring buffer is allocated according to window size, despite the real size of content.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sizeHint int
Estimated total input size for all encoding compress stream calls. Default: 0 (means the total input size if unknown).
final
windowBits int
Recommended sliding LZ77 windows bit size. The encoder may reduce this value if the input is much smaller than the windows size. Range: BrotliOption.minWindowBits..BrotliOption.maxWindowBits Default: BrotliOption.defaultWindowBits.
final

Methods

decode(List<int> encoded) List<int>
Decodes encoded data.
inherited
encode(List<int> input) List<int>
Encodes input.
inherited
fuse<R>(Codec<List<int>, R> other) Codec<List<int>, R>
Fuses this with other.
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

Static Properties

libraryPath String?
Return the library path String or null if not set.
getter/setter pair