dart_brotli 0.0.3 copy "dart_brotli: ^0.0.3" to clipboard
dart_brotli: ^0.0.3 copied to clipboard

A brotli encoder/decoder for Dart.

example/dart_brotli_example.dart

import 'dart:convert';
import 'dart:ffi';
import 'dart:io';
import 'dart:typed_data';
import 'package:dart_brotli/dart_brotli.dart';
import 'package:dart_brotli/generated_bindings.dart';
import 'package:ffi/ffi.dart';

void main() async {
  var file = File('users2.json');
  var out = File('users2.json.brotli');
  // var str = file.readAsStringSync();
  await Brotli().init();

  // var data = await Brotli().compress(str);
  // out.writeAsBytesSync(data);

  var decompressed = await Brotli().compress("kader");
  print(decompressed);
}
0
likes
90
pub points
0%
popularity

Publisher

unverified uploader

A brotli encoder/decoder for Dart.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

ffi

More

Packages that depend on dart_brotli