buff 1.0.0 copy "buff: ^1.0.0" to clipboard
buff: ^1.0.0 copied to clipboard

A buffer library for dart.

Buff #

A Dart library for buffering and manipulating data.

Includes #

dependencies:
  buff: ^1.0.0

Usage #

A simple usage example:

import 'dart:typed_data';

import 'package:buff/buff.dart';

void main() {
  final bytes = Uint8List.fromList([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
  
  // Using BufferInput
  final bufferInput = BufferInput.memory(bytes);
  final buffer = bufferInput.getBytes(2, 6);
  print(buffer); // Output: [3, 4, 5, 6]
  bufferInput.close();
  
  // Using AsyncBufferInput
  final asyncBufferInput = AsyncBufferInput.memory(bytes);
  asyncBufferInput.getBytes(4, 6).then((buffer) {
    print(buffer); // Output: [3, 4]
    asyncBufferInput.close();
  });
}

LICENSE #

Apache 2.0

0
likes
130
points
76
downloads

Publisher

unverified uploader

Weekly Downloads

A buffer library for dart.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

More

Packages that depend on buff