Skip to main content

Module varint

Module varint 

Source
Expand description

Varint traits and helpers used by the Lencode scheme.

Structs§

CustomPrimitiveBase

Enums§

Lencode
The Lencode integer encoding scheme is designed to encode integers in a variable‑length format that is efficient for both small and large values both in terms of space and speed.

Traits§

ByteLength
Trait for types that have a constant representing their byte length.
Max
Trait for types that have a constant representing the maximum value.
Min
Trait for types that have a constant representing the minimum value.
One
Trait for types that have a constant representing the value one.
OneHundredTwentySeven
Trait for types that have a constant representing the value 127.
SignedInteger
Trait for all signed integer types supported by this crate.
ToSigned
Trait for converting an unsigned integer to its signed equivalent.
ToUnsigned
Trait for converting a signed integer to its unsigned equivalent.
UnsignedInteger
Trait implemented by all supported unsigned integer types.
VarintEncodingScheme
A trait describing a variable‑length integer and boolean encoding scheme.
Zero
Trait for types that have a constant representing the value zero.

Functions§

zigzag_decode
Decodes an UnsignedInteger back into its SignedInteger representation using ZigZag encoding.
zigzag_encode
Encodes a SignedInteger into its UnsignedInteger representation using ZigZag encoding.