decode_var_string8

Function decode_var_string8 

Source
pub fn decode_var_string8(
    buf: &[u8],
) -> Result<(String, usize), StreamDecodeError>
Expand description

Decode a varString8 (1-byte length prefix + UTF-8 data).

Returns (string, bytes_consumed) on success.

ยงErrors

Returns error if buffer is too short or contains invalid UTF-8.