pullBytes method
Implementation
Uint8List pullBytes(int len) {
if (_readOffset + len > length) {
// throw Exception('Buffer underflow at readoffset: $_readOffset');
throw BufferReadError(
'Cannot pull $length bytes, only $remaining available',
);
}
final b = _byteData.buffer.asUint8List(
_byteData.offsetInBytes + _readOffset,
len,
);
_readOffset += len;
return b;
}