Expand description
Utilities for encoding and decoding.
Structs§
- Incomplete
Buffer - Returned when the buffer does not contains engouth bytes for decoding.
- Insufficient
Buffer - Returned when the encoded buffer is too small to hold the bytes format of the types.
Enums§
- Decode
Varint Error - Decoding varint error.
Functions§
- decode_
i16_ varint - Decodes a value from LEB128 variable length format.
- decode_
i32_ varint - Decodes a value from LEB128 variable length format.
- decode_
i64_ varint - Decodes a value from LEB128 variable length format.
- decode_
i128_ varint - Decodes a value from LEB128 variable length format.
- decode_
u16_ varint - Decodes a value from LEB128 variable length format.
- decode_
u32_ varint - Decodes a value from LEB128 variable length format.
- decode_
u64_ varint - Decodes a value from LEB128 variable length format.
- decode_
u128_ varint - Decodes a value from LEB128 variable length format.
- encode_
i16_ varint - Encodes an
i16
value into LEB128 variable length format, and writes it to the buffer. - encode_
i32_ varint - Encodes an
i32
value into LEB128 variable length format, and writes it to the buffer. - encode_
i64_ varint - Encodes an
i64
value into LEB128 variable length format, and writes it to the buffer. - encode_
i128_ varint - Encodes an
i128
value into LEB128 variable length format, and writes it to the buffer. - encode_
u16_ varint - Encodes an
u16
value into LEB128 variable length format, and writes it to the buffer. - encode_
u32_ varint - Encodes an
u32
value into LEB128 variable length format, and writes it to the buffer. - encode_
u64_ varint - Encodes an
u64
value into LEB128 variable length format, and writes it to the buffer. - encode_
u128_ varint - Encodes an
u128
value into LEB128 variable length format, and writes it to the buffer. - encoded_
i16_ varint_ len - Returns the encoded length of the value in LEB128 variable length format. The returned value will be between 1 and 3, inclusive.
- encoded_
i32_ varint_ len - Returns the encoded length of the value in LEB128 variable length format. The returned value will be between 1 and 5, inclusive.
- encoded_
i64_ varint_ len - Returns the encoded length of the value in LEB128 variable length format. The returned value will be between 1 and 10, inclusive.
- encoded_
i128_ varint_ len - Returns the encoded length of the value in LEB128 variable length format. The returned value will be between 1 and 19, inclusive.
- encoded_
u16_ varint_ len - Returns the encoded length of the value in LEB128 variable length format. The returned value will be between 1 and 3, inclusive.
- encoded_
u32_ varint_ len - Returns the encoded length of the value in LEB128 variable length format. The returned value will be between 1 and 5, inclusive.
- encoded_
u64_ varint_ len - Returns the encoded length of the value in LEB128 variable length format. The returned value will be between 1 and 10, inclusive.
- encoded_
u128_ varint_ len - Returns the encoded length of the value in LEB128 variable length format. The returned value will be between 1 and 19, inclusive.