readBytes method
Read bytes as Uint8List
.
This does the same as read, except it uses readByteStream to create
a Uint8List
, which offers better performance.
Implementation
Future<Uint8List> readBytes(int size) async =>
await readByteStream(substream(size));