Expand description
Variable byte encoding library for u64 integers. 变长字节编码库,用于 u64 整数。
Enums§
Functions§
- d
- Decode a single variable-byte encoded integer from the input. Returns the value and the number of bytes consumed.
- d_diff
diff - 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
u64into 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_diff
diff - Encodes a strictly increasing sequence of
u64integers 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
u64integers into variable-byte format.