compat library
Compat API: Uint8List/List<int> entry points.
This layer does not expose blit types, so callers can migrate from
package:brotli-style APIs without importing package:blit.
Classes
- BrotliCodec
- Brotli Codec with configurable encoder/decoder options.
- BrotliDecodeOptions
- Decoder options.
- BrotliDecoder
- Push-style streaming Brotli decoder.
- BrotliDecoderConverter
-
One-shot decoder converter (
Converter<List<int>, List<int>>). - BrotliDecoderSink
- Chunked decoder sink: feeds each chunk to a BrotliDecoder and emits every available decompressed chunk immediately.
- BrotliEncodeOptions
- Encoder options.
- BrotliEncoder
- Push-style streaming Brotli encoder.
- BrotliEncoderConverter
-
One-shot encoder converter (
Converter<List<int>, List<int>>). - BrotliEncoderSink
- Chunked encoder sink: accumulates input and emits the compressed stream on close (Brotli encoding needs the whole block to make decisions).
- BrotliPreparedDictionary
- A compound dictionary with its four-byte-prefix index built once.
- BytesInputQueue
-
FIFO of byte chunks handed to the decoder as a
BitReaderInput.
Enums
- BrotliErrorCode
- Stable, format-oriented error codes.
- BrotliMode
- Brotli encoder mode.
- BrotliStatus
- Streaming decoder status.
Functions
-
brotliCompress(
Uint8List input, {BrotliEncodeOptions options = const BrotliEncodeOptions()}) → Uint8List - Compresses one complete buffer into a valid Brotli stream.
-
brotliCompressString(
String input, {BrotliEncodeOptions options = const BrotliEncodeOptions()}) → Uint8List -
UTF-8-encodes
inputand compresses it. -
brotliDecompress(
Uint8List input, {BrotliDecodeOptions options = const BrotliDecodeOptions()}) → Uint8List - Decompresses one complete Brotli stream.
-
brotliDecompressToString(
List< int> input, {BrotliDecodeOptions options = const BrotliDecodeOptions(), bool allowMalformed = false}) → String -
Decodes Brotli-compressed
inputas UTF-8. -
maxCompressedSize(
int inputSize) → int -
Upper bound on the size of brotliCompress output for
inputSizebytes.
Exceptions / Errors
- BrotliException
- Exception thrown for malformed streams, unsupported features and limits.