https://github.com/dim13/cobs
Consistent Overhead Byte Stuffing
https://github.com/dim13/cobs
cobs encoding golang
Last synced: 5 months ago
JSON representation
Consistent Overhead Byte Stuffing
- Host: GitHub
- URL: https://github.com/dim13/cobs
- Owner: dim13
- License: isc
- Created: 2017-01-29T01:17:49.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-06-11T16:20:41.000Z (over 1 year ago)
- Last Synced: 2025-07-21T06:49:47.406Z (6 months ago)
- Topics: cobs, encoding, golang
- Language: Go
- Homepage:
- Size: 478 KB
- Stars: 11
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Consistent Overhead Byte Stuffing
COBS encoder breaks a packet into one or more sequences of non-zero
bytes. The encoding routine searches through the first 254 bytes of
the packet looking for the first occurrence of a zero byte. If no
zero is found, then a code of 0xFF is output, followed by the 254
non-zero bytes. If a zero is found, then the number of bytes
examined, n, is output as the code byte, followed by the actual
values of the (n-1) non-zero bytes up to (but not including) the zero
byte. This process is repeated until all the bytes of the packet have
been encoded.
## Links
* http://www.stuartcheshire.org/papers/COBSforToN.pdf
* https://pkg.go.dev/github.com/dim13/cobs