duffer 2.3.2 copy "duffer: ^2.3.2" to clipboard
duffer: ^2.3.2 copied to clipboard

A pure dart library offering support for netty-like byte buffer manipulation and binary serialization via a pickle inspired system


Duffer Logo

A pure dart library offering support for netty-like byte buffer manipulation and binary serialization via a pickle inspired system.


Features #

Feature Status
Buffers
Read/Write
Get/Set
Child Buffers
Unpooled
Pooled
Primitive Datatypes
Hex Encoding
Base64 Encoding
File Buffers ✅ (experimental)
Streamed Buffers

Getting started #

After you've imported the library with

import 'package:duffer/duffer.dart';

You can creates buffers via the Unpooled and Pooled utility classes and just write to it and read from it

var buffer = Unpooled.buffer();
buffer.writeLPString("Hello World!");
buffer.writeInt32(42);

print(buffer.readLPString()); // Hello World!
print(buffer.readInt32()); // 42

or parse existing data via one of the various extension functions.

var buffer1 = "SGVsbG8gV29ybGQ=".parseBase64();
var buffer2 = "0000000b48656c6c6f20576f726c64".parseHex();

You can also encode your buffer using base64 or hex.

print(buffer.hex);
print(buffer.base64);

For more samples just have a look at the examples folder.

4
likes
160
pub points
51%
popularity

Publisher

verified publisherhelight.dev

A pure dart library offering support for netty-like byte buffer manipulation and binary serialization via a pickle inspired system

Repository (GitHub)
View/report issues

Topics

#buffer #netty #binary #bytes

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

fixnum, meta

More

Packages that depend on duffer