Uint8List readBytes(int length) { final bytes = Uint8List.view(Uint8List.fromList(values).buffer, index, length); index += length; return bytes; }