decode_i32_varint

Function decode_i32_varint 

Source
pub fn decode_i32_varint(buf: &[u8]) -> Result<(usize, i32), DecodeVarintError>
Expand description

Decodes a value from LEB128 variable length format.

§Arguments

  • buf - A byte slice containing the LEB128 encoded value.

§Returns

  • Returns the bytes readed and the decoded value as i32 if successful.

  • Returns DecodeVarintError if the buffer did not contain a valid LEB128 encoding