io library
Optional file helpers for Brotli streams.
Backed by package:blit's random-access BytesFile (native dart:io
backend, Web OPFS backend), so this library stays web-safe: it never
imports dart:io.
Import it explicitly:
import 'package:brotli_neo/io.dart';
final raw = await brotliDecodeFile('data.txt.br');
await brotliEncodeFile('data.txt.br', raw);
Functions
-
brotliDecodeFile(
String path, {BrotliDecodeOptions options = const BrotliDecodeOptions()}) → Future< Uint8List> -
Decompresses the Brotli stream stored in
path. -
brotliEncodeFile(
String path, Uint8List input, {BrotliEncodeOptions options = const BrotliEncodeOptions(), bool create = true}) → Future< void> -
Compresses
inputand writes the stream topath.