pub fn encode_varint(buf: &mut BytesMut, value: usize)
Encode a varint (variable-length integer) into the buffer. Uses 7 bits per byte, MSB indicates continuation.