feat: donglora-cobs workspace crate with 31 spec-compliance tests
Extract COBS encoder/decoder into a separate no_std workspace crate (crates/donglora-cobs) with comprehensive tests against the Cheshire & Baker 1999 IEEE/ACM specification and Wikipedia canonical vectors. Tests cover: empty input, single/multiple zeros, block boundaries at 254/255 bytes, alternating patterns, the Ping regression case (tag 0x00), round-trip verification, and error cases (truncation, unexpected zeros). Replace inline cobs_decode() in usb/task.rs with the tested crate. Replace external cobs dependency with workspace crate. Fix encoder bug at 254-byte block boundary (spurious trailing code byte).
This commit is contained in:
5 files changed
+542
-40
No files matched your search
@@ -0,0 +1,9 @@
|
||||
[package]
|
||||
name = "donglora-cobs"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
description = "COBS encoder/decoder — no_std, zero-alloc, spec-compliant"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
Reference in new issue
Block a user