This repository has been archived on 2026-08-31. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
donglora/crates/donglora-cobs
swaits 1fc86f413a test: exhaustive COBS interop tests against corncobs, porting guide, README
- 8 new interop tests cross-validating our COBS encoder/decoder against
  corncobs (including 500 random payloads). Total: 39 tests.
- New: src/board/PORTING.md — step-by-step guide to adding a new board
- New: crates/donglora-cobs/README.md — documents design choice and testing
- Updated README with lora_bridge.py example
2026-03-30 08:55:48 -06:00
..

donglora-cobs

Minimal COBS (Consistent Overhead Byte Stuffing) encoder/decoder.

  • no_std, zero-alloc, zero dependencies at runtime
  • Spec-compliant: implements Cheshire & Baker (IEEE/ACM 1999)
  • Exhaustively tested: 39 tests including cross-validation against corncobs

Why our own crate?

DongLoRa is an embedded firmware project. We want:

  • Zero runtime dependencies (just 130 lines of code)
  • Complete control over the implementation
  • Spec compliance verified against both the canonical Wikipedia vectors AND a battle-tested third-party crate (corncobs)

For higher-throughput use cases, consider corncobs which has been benchmark-optimized for streaming applications.

Testing

cargo test -p donglora-cobs

Tests include:

  • 18 canonical COBS vectors (Wikipedia / IEEE/ACM spec)
  • Round-trip verification for various payload sizes
  • 8 interop tests cross-validating against corncobs (dev-dependency)
  • 500 randomized round-trip payloads verified against corncobs