Add COBS encoding support (encoding and decoding) #70

Merged
tbaumgartl merged 1 commits from blochm/fsfw:bloch/cobs into main 2026-08-27 07:24:55 +02:00
Contributor

A COBS encoder and decoder including tests. It runs in O(n) time complexity and O(1) space complexity, making it embedded friendly. Output buffer size can be calculated in compile time using the constexpr function worstCaseEncodedLen. Documentation is provided as well as a proof for the formula in worstCaseEncodedLen. Also has a simple way of detecting and giving the user a simply way of skipping over broken frames (if optionally needed).

Why: General implementation, which could be useful else where.
Tests: Some testcases are implemented covering all errors and hopefully edgecases.

A COBS encoder and decoder including tests. It runs in O(n) time complexity and O(1) space complexity, making it embedded friendly. Output buffer size can be calculated in compile time using the constexpr function `worstCaseEncodedLen`. Documentation is provided as well as a proof for the formula in `worstCaseEncodedLen`. Also has a simple way of detecting and giving the user a simply way of skipping over broken frames (if optionally needed). Why: General implementation, which could be useful else where. Tests: Some testcases are implemented covering all errors and hopefully edgecases.
blochm added 1 commit 2026-08-15 12:33:33 +02:00
tbaumgartl merged commit b1d2a4726f into main 2026-08-27 07:24:55 +02:00
Sign in to join this conversation.