Function cobs::decode_in_place

source ·
pub fn decode_in_place(buff: &mut [u8]) -> Result<usize, ()>
Expand description

Decodes a message in-place.

This is the same function as decode, but replaces the encoded message with the decoded message instead of writing to another buffer.

The returned usize is the number of bytes used for the DECODED value, NOT the number of source bytes consumed during decoding.