cobsin 1.0.0

COBS encoding/decoding, in-place. `no_std`, zero allocations.
Documentation
  • Coverage
  • 37.5%
    3 out of 8 items documented1 out of 6 items with examples
  • Size
  • Source code size: 18.42 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • darkcodi/cobsin
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • darkcodi

📦 cobsin

crates.io docs.rs MIT License

COBS encoding/decoding, in-place. no_std, zero allocations.

COBS (Consistent Overhead Byte Stuffing) eliminates zero bytes from data — perfect for packet protocols where 0x00 marks boundaries.

✨ Why?

  • 🔧 In-place — encode/decode without extra buffers
  • 📦 no_std — works on bare-metal & embedded
  • 🚀 Zero alloc — no heap, ever

🚀 Quick look

let mut buf = [0u8; 32];
buf[..11].copy_from_slice(b"Hello\x00World");

// Encode
let enc_len = cobsin::cobs_encode_in_place(&mut buf, 11)?;

// Decode
let dec_len = cobsin::cobs_decode_in_place(&mut buf, enc_len)?;

assert_eq!(&buf[..dec_len], b"Hello\x00World");

📦 Install

[dependencies]
cobsin = "0.1"

MIT — do whatever.