FLUTTER ECOSYSTEM

isoos/buffer

バイトバッファおよびストリーム用のDartライブラリ。

バッファ のプロジェクト画像
Stars
22
Forks
10
最終プッシュ(UTC)
2024/03/11
プロジェクト状態
公開中
István Soós GitHub avatar
GITHUB User

István Soós ↗

software engineer

@agilordBudapest, Hungary公式サイト ↗
言語Dart

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 2 件

元の 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