v1.2.3
buffer
用於高效處理位元組緩衝區和串流的實用函數與類別,以讀取和寫入二進位資料格式。
19喜歡 22.9萬近 30 天下載150Pub 分數
AndroidiOSWebmacOSWindowsLinux
用於字節緩衝區和串流的 Dart 庫。
以下為英文專案原文快照,最新內容請造訪 GitHub。
Utility functions and classes to work with byte buffers and streams efficiently, to read and write binary data formats.
Here are some examples of how you can use the buffer package:
This example demonstrates how to write unsigned integers of different sizes to a ByteDataWriter and then read them back using a ByteDataReader.
final writer = ByteDataWriter();
writer.writeUint8(255);
writer.writeUint16(65535);
writer.writeUint32(4294967295);
final reader = ByteDataReader();
reader.add(writer.toBytes());
print(reader.readUint8()); // Output: 255
print(reader.readUint16()); // Output: 65535
print(reader.readUint32()); // Output: 4294967295