Consistent Overhead Byte Stuffing

Consistent Overhead Byte Stuffing

Consistent Overhead Byte Stuffing (COBS) is an algorithm for encoding data bytes that results in efficient, reliable, unambiguous packet framing regardless of packet content, thus making it easy for receiving applications to recover from malformed packets. It employs a particular byte value, typically zero, to serve as a packet delimiter (a special value that indicates the boundary between packets). When zero is used as a delimiter, the algorithm replaces each zero data byte with a non-zero value so that no zero data bytes will appear in the packet and thus be misinterpreted as packet boundaries.

Comment
enConsistent Overhead Byte Stuffing (COBS) is an algorithm for encoding data bytes that results in efficient, reliable, unambiguous packet framing regardless of packet content, thus making it easy for receiving applications to recover from malformed packets. It employs a particular byte value, typically zero, to serve as a packet delimiter (a special value that indicates the boundary between packets). When zero is used as a delimiter, the algorithm replaces each zero data byte with a non-zero value so that no zero data bytes will appear in the packet and thus be misinterpreted as packet boundaries.
Depiction
Cobs encoding with example.png
Has abstract
enConsistent Overhead Byte Stuffing (COBS) is an algorithm for encoding data bytes that results in efficient, reliable, unambiguous packet framing regardless of packet content, thus making it easy for receiving applications to recover from malformed packets. It employs a particular byte value, typically zero, to serve as a packet delimiter (a special value that indicates the boundary between packets). When zero is used as a delimiter, the algorithm replaces each zero data byte with a non-zero value so that no zero data bytes will appear in the packet and thus be misinterpreted as packet boundaries. Byte stuffing is a process that transforms a sequence of data bytes that may contain 'illegal' or 'reserved' values (such as packet delimiter) into a potentially longer sequence that contains no occurrences of those values. The extra length of the transformed sequence is typically referred to as the overhead of the algorithm. HDLC framing is a well-known example, used particularly in PPP (see RFC 1662 § 4.2). Although HDLC framing has an overhead of <1% in the average case, it suffers from a very poor worst-case overhead of 100%; for inputs that consist entirely of bytes that require escaping, HDLC byte stuffing will double the size of the input. The COBS algorithm, on the other hand, tightly bounds the worst-case overhead. COBS requires a minimum of 1 byte overhead, and a maximum of ⌈n/254⌉ bytes (one byte in 254, rounded up). Consequently, the time to transmit the encoded byte sequence is highly predictable, which makes COBS useful for real-time applications in which jitter may be problematic. The algorithm is computationally inexpensive, and in addition to its desirable worst-case overhead, its average overhead is also low compared to other unambiguous framing algorithms like HDLC.COBS does, however, require up to 254 bytes of lookahead. Before transmitting its first byte, it needs to know the position of the first zero byte (if any) in the following 254 bytes. A 1999 Internet Draft proposed to standardize COBS as an alternative for HDLC framing in PPP, due to the aforementioned poor worst-case overhead of HDLC framing.
Hypernym
Algorithm
Is primary topic of
Consistent Overhead Byte Stuffing
Label
enConsistent Overhead Byte Stuffing
Link from a Wikipage to an external page
pypi.python.org/pypi/cobs
github.com/cmcqueen/cobs-c
pythonhosted.org/cobs/cobsr-intro.html
web.archive.org/web/20180719005741/http:/www.jacquesf.com/2011/03/consistent-overhead-byte-stuffing/
datatracker.ietf.org/doc/html/rfc1662%23section-4.2
patents.google.com/patent/US9438411B1
Link from a Wikipage to another Wikipage
Algorithm
Bit stuffing
Category:Encodings
Communications protocol
Delimiter
File:Cobs encoding with example.png
Hexadecimal
High-Level Data Link Control
Internet Draft
Packet (information technology)
Payload (computing)
Point-to-point protocol
Serial Line Internet Protocol
SameAs
4iK5W
Consistent Overhead Byte Stuffing
m.0fq33gw
Q5163224
Вставка байтов с фиксированной избыточностью
Subject
Category:Encodings
Thumbnail
Cobs encoding with example.png?width=300
WasDerivedFrom
Consistent Overhead Byte Stuffing?oldid=1087394483&ns=0
WikiPageLength
12147
Wikipage page ID
29719643
Wikipage revision ID
1087394483
WikiPageUsesTemplate
Template:Blue
Template:Ceil
Template:Green
Template:Mono
Template:Red
Template:Reflist