Module pui

Module pui 

Source
Expand description

Packed Unsigned Integers (PUIs).

Little-endian base-128 encoding with a continuation bit, capped at three bytes. See “Packed Unsigned Integers” in the minimal ULCP spec.

Enums§

Error

Constants§

MAX_LEN
Largest encoded size of a PUI.
MAX_VALUE
Largest value encodable in the three-byte PUI limit.

Functions§

decode
Decode a PUI from the start of input.
encode
Encode value into out, returning the number of bytes written.
encoded_len
Return the encoded size of value in bytes.