Documentation ¶
Overview ¶
Package cobs implenments COBS (https://en.wikipedia.org/wiki/Consistent_Overhead_Byte_Stuffing).
Package cobs implements COBS. For encoding create an Encoder and use the Write method as shown in TestWrite. For decoding create a Decoder and use the Read method as shown in TestSingleRead and TestMultiRead. It is possible to use only the functions cobs.Decode or cobs.CEncode. Package cobs is also a helper for testing the target C-code. Each C function gets a Go wrapper which ist tested in appropriate test functions. For some reason inside the cobs_test.go an 'import "C"' is not possible.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDecoder ¶
NewDecoder creates a decoder instance and returns its address. r will be used as inner reader. size is used as size for the inner buffers. Max one decoded COBS package is returned by Read.
Types ¶
This section is empty.