fastRead method

Future<Uint8List> fastRead(
  1. int count
)

A potentially faster variant of readBuffer.

Subclasses are free to implement this in any way that is faster than calling readBuffer

Implementation

Future<Uint8List> fastRead(int count) async {
  final list = Uint8List(count);
  final actual = await readBuffer(count, list);
  return Uint8List.view(list.buffer, 0, actual);
}