Crate vb

Crate vb 

Source
Expand description

Variable byte encoding library for u64 integers. 变长字节编码库,用于 u64 整数。

Enums§

Error

Functions§

d
Decode a single variable-byte encoded integer from the input. Returns the value and the number of bytes consumed.
d_diffdiff
Decodes a sequence of integers encoded with e_diff. Reconstructs the original increasing sequence from the differences.
d_li
Decodes a list of variable-byte encoded integers from the input.
d_offset
Decode a single variable-byte encoded integer from the buffer at the given offset. Updates the offset to point after the decoded value. Highly optimized with unsafe pointer arithmetic and bounds check elimination.
e
Encodes a single u64 into variable-byte format and appends to the buffer. This function does not clear the buffer; it appends the encoded bytes to the end. Optimized to avoid repeated capacity checks and len updates.
e_diffdiff
Encodes a strictly increasing sequence of u64 integers using differential encoding (delta encoding) combined with variable-byte encoding. This reduces the serialized size by storing the differences between consecutive values.
e_li
Encodes a list of u64 integers into variable-byte format.

Type Aliases§

Result