Expand description
Basic Consistent Overhead Byte Stuffing (COBS).
Functions§
- decode
- Decodes basic-COBS
srcintodst, returning the number of bytes written. - decode_
in_ place - Decodes basic-COBS data in place, overwriting
bufwith the decoded output and returning its length. The decoded bytes occupybuf[..len]. - decode_
in_ place_ with_ sentinel - Decodes basic-COBS data that was encoded with an arbitrary
sentinelbyte in place, overwritingbufwith the decoded output and returning its length.sentinel == 0is identical todecode_in_place. - decode_
to_ vec - Decodes basic-COBS
src, returning a newly allocatedVec. - decode_
to_ vec_ with_ sentinel - Decodes basic-COBS
srcthat was encoded with an arbitrarysentinelbyte, returning a newly allocatedVec. - decode_
with_ sentinel - Decodes basic-COBS
srcthat was encoded with an arbitrarysentinelbyte (seeencode_with_sentinel) intodst, returning the number of bytes written.sentinel == 0is identical todecode. - encode
- Encodes
srcwith basic COBS intodst, returning the number of bytes written. - encode_
to_ vec - Encodes
srcwith basic COBS, returning a newly allocatedVec. - encode_
to_ vec_ with_ sentinel - Encodes
srcwith basic COBS and an arbitrarysentinelbyte, returning a newly allocatedVec. - encode_
with_ sentinel - Encodes
srcwith basic COBS intodstusing an arbitrarysentinelbyte instead of0x00, returning the number of bytes written.