Module utils

Source

Functionsยง

decode_property
Decodes a key-value pair using PackStream. Keys are strings, but values can be anything which implements Unpack.
encode_property
Encodes a given key and value as a property as used by Dictionary. This can be used as a flat shortcut to encode any key-value pair using PackStream. Keys are strings and encoded values can be anything which implements Pack. Returns the number of bytes written to the stream.