FLUTTER ECOSYSTEM

isoos/buffer

用於字節緩衝區和串流的 Dart 庫。

緩衝區 專案封面
Stars
22
Forks
10
最近推送(UTC)
2024年3月11日
專案狀態
未封存
István Soós GitHub avatar
GITHUB User

István Soós ↗

software engineer

@agilordBudapest, Hungary官方網站 ↗
語言Dart

此儲存庫發佈的套件

使用的依賴

依賴清單 2 項
  • lints開發依賴^3.0.0
  • test開發依賴^1.16.7

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 README

Buffer - Dart library for byte buffers and streams.

Pub

Utility functions and classes to work with byte buffers and streams efficiently, to read and write binary data formats.

Examples

Here are some examples of how you can use the buffer package:

Writing to a ByteDataWriter and reading from a ByteDataReader

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