v2 library

v0.2.0 performance API.

Raw Uint8List entry points with preallocated-output variants:

final compressed = BrotliEncoderV2.encode(raw);
final roundTrip = BrotliDecoderV2.decode(compressed);

The legacy blit-native and compat APIs remain available from package:brotli_neo/brotli_neo.dart and package:brotli_neo/compat.dart during the migration; they are not on the v2 hot path.

Classes

BrotliDecodeOptions
Decoder options.
BrotliDecoderV2
Fast Brotli decoder (v2).
BrotliEncodeOptions
Encoder options.
BrotliEncoderV2
The v0.2.0 encoder API.
BrotliStreamDecoderV2
Streaming v2 decoder over raw Uint8List chunks (no blit types).

Enums

BrotliErrorCode
Stable, format-oriented error codes.
BrotliMode
Brotli encoder mode.
BrotliStatus
Streaming decoder status.

Constants

v2Lgwin → const int
Window bits used by the v2 fast path.
v2MaxFastQuality → const int
Highest quality served by the v2 fast path. Qualities 2..5 use it; quality 0 and 1 are routed to the v1 greedy encoder, which is measurably faster there, and quality 6+ keeps the v1 quality tiers.
v2MinFastQuality → const int
Lowest quality served by the v2 fast path.

Exceptions / Errors

BrotliException
Exception thrown for malformed streams, unsupported features and limits.