Apex › Data & encoding

COBS — Consistent Overhead Byte Stuffing

How you frame a raw byte stream so 0x00 can mark the end of a frame — even when the payload contains zeros. COBS removes every zero byte with a tiny, bounded overhead (⌊n/254⌋+1 bytes, never the doubling that escaping risks), leaving 0x00 free as the delimiter. Pick a payload and watch the zeros vanish into code bytes, then decode back exactly.

More in Data & encoding