Skip to content

Latest commit

 

History

History
4 lines (3 loc) · 1 KB

File metadata and controls

4 lines (3 loc) · 1 KB

Consistent Overhead Byte Stuffing in C#

[Consistent Overhead Byte Stuffing](http://en.wikipedia.org/wiki/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) [**...**](http://en.wikipedia.org/wiki/ConsisteConsistent_Overhead_Byte_Stuffing)

Thanks to jacquesf for providing a starting point for my library. Please note that I had to make subtle modifications to his encoding method to produce the expected results found in the Wikipedia article. Please let me know if you find believe there are errors in my implementation.