chromium_pickle 1.0.4 copy "chromium_pickle: ^1.0.4" to clipboard
chromium_pickle: ^1.0.4 copied to clipboard

This library ports Chromium's Pickle class to Dart and provides facilities for basic binary value packing and unpacking.

example/example.dart

import 'package:chromium_pickle/chromium_pickle.dart';

void main() {
  // Create empty pickle
  var pickle = Pickle.empty();

  // Write value to pickle
  pickle.writeInt(1024);

  // Create iterator
  var iterator = pickle.createIterator();

  // Read value
  print(iterator.readInt());

  // Dump pickle to Uint8List
  var pickleData = pickle.toUint8List();

  // Create new pickle from Uint8List
  var newIterator = Pickle.fromUint8List(pickleData).createIterator();

  // There is it again!
  print(newIterator.readInt());
}
2
likes
0
points
53
downloads

Publisher

verified publisherpubdev.kasefuchs.su

Weekly Downloads

This library ports Chromium's Pickle class to Dart and provides facilities for basic binary value packing and unpacking.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on chromium_pickle