Encode: rewrite to two-pass (scan + copy_from_slice) leveraging Rust 1.93's
const fn copy_from_slice for memcpy at runtime while keeping const fn encode.
Sub-slice scan pattern helps LLVM eliminate bounds checks. Added zero byte
fast path for all-zeros workloads. Now leads corncobs on nonzero/mixed encode.
Decode: batch consecutive 0x01 codes (all-zeros data) and fill zeros via
memset instead of per-byte loop. Decode zeros throughput jumps from ~1.2 GB/s
to ~4.6 GB/s, now 3x faster than corncobs on that workload.
Bump MSRV 1.83 → 1.93 for const copy_from_slice.
Update dev-deps: cobs 0.3→0.5, criterion 0.5→0.8, rand 0.8→0.10.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Make `encode` const fn for compile-time COBS encoding (MSRV bumped to 1.83)
- Optimize decode by removing unnecessary branch in inner loop
- Add comprehensive rustdoc with examples for every function
- Add crate-level doc sections: quick start, buffer sizing, framing,
stream parsing, compile-time encoding, error handling
- Expand README with decision matrix, examples section, testing depth
- Bump version to 0.2.0
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>