Expand description
Buffer utilities for synchronous varint and string encoding/decoding
These utilities work on in-memory byte slices and are used for parsing compressed block data and constructing query packets.
Functionsยง
- read_
string - Read a length-prefixed string from a byte slice
- read_
varint - Read a varint-encoded u64 from a byte slice
- write_
string - Write a length-prefixed string to a byte buffer
- write_
varint - Write a varint-encoded u64 to a byte buffer
- write_
varint_ to_ vec - Write a varint to a raw
Vec<u8>(convenience for tests)