On 04/25/2010 02:20 PM, Masahiro Nakagawa wrote:
I release a serialization library for Phobos(D2).
Project repository: http://www.bitbucket.org/repeatedly/msgpack4d
MessagePack is a binary-based serialization spec.
See official site for details: http://msgpack.sourceforge.net/
Some application replace JSON with MessagePack for performance improvement.
msgpack4d ver 0.1.0 has an equal features with reference implementation.
* Zero copy serialization / deserialization
* Stream deserializer
* Support some D features(Range, Tuple)
Currently, Phobos doesn't have a real serialization module(std.json
lacks some features)
I hope Phobos adopts this library for serialization(std.msgpack or
std.serialization?).
Phobos should definitely have a serialisation module, and this seems to
me like a good candidate. I haven't tried the code myself, but it looks
very clean and the examples are nice.
I consider it a huge plus that it uses an existing format that already
has APIs for a bunch of programming languages.
Two questions:
The packer can write to an arbitrary ubyte output range, but it seems
the unpacker is limited to ubyte[] arrays. Would it be possible to
unpack from an arbitrary input range?
It doesn't seem to support the real type. It this a limitation of the
MessagePack format or just an oversight? Even if the format doesn't
directly support 80-bit floats, it should be possible to wrap them somehow.
-Lars