BrotliEncoder class

The BrotliEncoder encoder is used to brotli compress data.

Inheritance

Constructors

BrotliEncoder({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, int inputBufferLength = CodecBufferHolder.autoLength, int outputBufferLength = CodecBufferHolder.autoLength})
Construct an BrotliEncoder with the supplied parameters used by the Brotli encoder.

Properties

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
directDistanceCodeCount int?
Recommended number of direct distance codes. Encoder may change this value. Default: nil (dynamically computed).
final
hashCode int
The hash code for this object.
no setterinherited
inputBufferLength int
Length in bytes of the buffer used for input data.
final
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
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

asByteSink(Sink<List<int>> sink) ByteConversionSink
Ensure a conversion to ByteConversionSink which provides an interface for converters to efficiently transmit byte data.
inherited
bind(Stream<List<int>> stream) Stream<List<int>>
Transforms the provided stream.
inherited
cast<RS, RT>() Converter<RS, RT>
Provides a Converter<RS, RT> view of this stream transformer.
inherited
convert(List<int> bytes) List<int>
Encode/Decode a List of bytes.
inherited
fuse<TT>(Converter<List<int>, TT> other) Converter<List<int>, TT>
Fuses this with other.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
performOneShotConversion(Sink<List<int>> sink, List<int> bytes) bool
Subclasses may override to perform a one-shot optimized conversion of bytes to the sink.
inherited
startChunkedConversion(Sink<List<int>> sink) ByteConversionSink
Start a chunked conversion using the options given to the BrotliEncoder constructor.
override
toString() String
A string representation of this object.
inherited

Operators

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