Binary
class Binary
This class implements the (de)serialization of TagContext using the binary wire format.
Traits
Varint encoding and decoding methods inspired by Go encoding/binary package.
Constants
TAGS_VERSION_ID |
Binary Encoding Version number |
KEYTYPE_STRING |
KeyTypes (currently only string is supported) |
KEYTYPE_INT64 |
|
KEYTYPE_TRUE |
|
KEYTYPE_FALSE |
|
Methods
static string
static TagContext
Details
in VarintTrait at line 33
static int
encodeUnsigned(string $buf, int $x)
Varint encode as unsigned integer.
in VarintTrait at line 51
static int
encodeSigned(string $buf, int $x)
Varint encode as signed integer.
in VarintTrait at line 67
static int
decodeUnsigned(string $buf, int $x)
Varint decode an unsigned integer.
in VarintTrait at line 96
static int
decodeSigned(string $buf, int $x)
Varint decode a signed integer.
at line 48
static string
encode(TagContext $tagContext)
Encode the provided TagContext to our binary wire format.
at line 73
static TagContext
decode(string $str, Exception $err = null)
Decode the provided TagContext from the binary wire format.