What it solves
Text payloads waste bytes and parsing work on constrained links.
How it works
1Values→2caller buffer encoder→3CBOR bytes
Use it when
Encode compact telemetry maps
Decode known typed fields
Skip unknown fields for forward compatibility
Quick Start
#include "mcbor.h"
uint8_t buf[64]; mcbor_enc_t e; size_t used=0;
mcbor_enc_init(&e,buf,sizeof buf);
mcbor_enc_map(&e,1); mcbor_enc_str(&e,"ok"); mcbor_enc_bool(&e,true);
mcbor_enc_size(&e,&used);
/* Expected: used reports a compact definite-length CBOR map. */Engineering evidence
- README documents zero allocation and the exact implemented subset
Known limits
- No 64-bit integers, indefinite items or tags
- Implements a subset, not all RFC 8949 features