nxt.leb128

LEB128 (Little Endian Base 128).

Members

Functions

decodeLEB128
SInt decodeLEB128(ubyte* p, uint* n)

Decode a LEB128-encoded value of signed integer type SInt.

decodeULEB128
ulong decodeULEB128(ubyte* p, uint* n)

Decode a ULEB128 value.

encodeLEB128
void encodeLEB128(Output os, Unqual!SInt value)

Encode a LEB128-encoded value of signed integer type SInt to os.

encodeULEB128
void encodeULEB128(Output os, Unqual!UInt value)

Encode a ULEB128 value to os.

encodeULEB128
uint encodeULEB128(ulong value, ubyte* p)

Encode a ULEB128 value to a buffer.

See Also

https://en.wikipedia.org/wiki/LEB128

http://forum.dlang.org/post/ykskvwqdsxlyjispappj@forum.dlang.org

TODO Move to Phobos at std/experimental/codings/leb128.d

Meta