xserial 0.1.0
Binary serialization library
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
xserial
Binary serialization and deserialization library that uses xbuffer.
import xserial;
assert(true.serialize() == [1]);
assert(deserialize!bool([0]) == false);
assert(12.serialize!(Endian.bigEndian)() == [0, 0, 0, 12]);
assert(deserialize!(int, Endian.littleEndian)([44, 0, 0, 0]) == 44);
assert([1, 2, 3].serialize!(Endian.littleEndian, ushort)() == [3, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0]);
assert(deserialize!(ushort[], Endian.bigEndian, uint)([0, 0, 0, 2, 0, 12, 0, 44]) == [12, 44]);
struct Foo { ubyte a, b, c; }
Foo foo = Foo(1, 2, 4);
assert(foo.serialize.deserialize!Foo == foo);
- Registered by Kripth
- 0.1.0 released 6 years ago
- Kripth/xserial
- MIT
- Authors:
- Dependencies:
- xbuffer
- Versions:
-
1.1.1 2018-Sep-09 1.1.0 2018-Aug-26 1.0.0 2018-Aug-23 0.1.1 2018-Aug-22 0.1.0 2018-Aug-22 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
262 downloads total
-
- Score:
- 0.4
- Short URL:
- xserial.dub.pm