buffer

v1.2.3

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

Архив пакета: https://pubdev.letsnova.ru/api/archives/buffer/1.2.3.tar.gz

Установкаdart pub add buffer

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
                

История изменений

1.2.3

  • Updated example, lints and pubspec content.

1.2.2

  • Fix bug on duplicate null-terminated bytes.

1.2.1

  • Support for efficiently reading null-terminated bytes.

1.2.0

  • Perfomance optimizations. (Thanks to insinfohttps://github.com/insinfo))

1.1.1

  • Fixed bug related to zero byte read at end of buffer. (#8 thanks to adrianboyko)

1.1.0

  • Final null-safe release.

1.1.0-nullsafety.0

  • Updated to null safety, no changes to external API. (#6 thanks to TimWhiting)

1.0.7

  • Updated to modern Dart standards.
  • ByteDataReader.offsetInBytes.

1.0.6

  • Using package:pedantic as base of the lint rules.

1.0.5+1

  • Fix offsetInBytes use.

1.0.5

  • More efficient merge in ByteDataReader.

1.0.4

  • Fix buffer processing bug.

1.0.3

  • ByteDataReader.readAhead

1.0.2

  • byteLength-driven read and write methods for integers.

1.0.1

  • Fix return type of ByteDataReader.read().

1.0.0

  • Initial version.