Skip to main content

encode_unchecked

Function encode_unchecked 

Source
pub unsafe fn encode_unchecked(data: &[u8], encoded: &mut [u8]) -> usize
Expand description

Encodes an opaque data blob with COBS using 0 as the sentinel value. Returns the number of bytes the encoding took.

ยงSafety

The caller must ensure encoded has at least encode_buffer(data.len()) bytes.