dproto.serialize

Serialization/deserialization code

Members

Functions

IsBuiltinType
bool IsBuiltinType(string type)

Returns whether the given string is a protocol buffer primitive

defaultDecode
void defaultDecode(ulong header, ubyte[] data)

Removes bytes from the range as if it were read in

fromVarint
long fromVarint(ubyte[] src)

Decode a VarInt-encoded series of bytes into a value

fromZigZag
long fromZigZag(ulong src)

Decodes a number from its zigzag encoding

msgNum
ulong msgNum(ulong data)

Get the message number from the encoding value

readProto
BuffType!T readProto(ubyte[] src)

Decode a series of bytes into a value

readVarint
long readVarint(ubyte[] src)

Read a VarInt-encoded value from a data stream

toVarint
ubyte[] toVarint(long src)

Encode a value into a VarInt-encoded series of bytes

toZigZag
ulong toZigZag(long src)

Encodes a number in its zigzag encoding

wireType
ubyte wireType(ulong data)

Get the wire type from the encoding value

writeProto
ubyte[] writeProto(BuffType!T src)

Encode a value into a series of bytes

Manifest constants

ENUM_SERIALIZATION
enum ENUM_SERIALIZATION;

The type to encode an enum as

PACKED_MSG_TYPE
enum PACKED_MSG_TYPE;

The message type to encode a packed message as

Templates

BuffType
template BuffType(string T)

Maps the given type string to the data type it represents

MsgType
template MsgType(string T)

Maps the given type string to the wire type number

Meta

Authors

Matthew Soucy, msoucy@csh.rit.edu

Date

Date: Oct 5, 2013

Version

0.0.2