PackageTrack
Sign in Get early access

cobs

This is an implementation of the Consistent Overhead Byte Stuffing (COBS) algorithm. COBS is an algorithm for transforming a message into an encoding where a specific value (the "sentinel" value) is not used. This value can then be used to mark frame boundaries in a serial communication channel.

0.5.1 54M downloads/mo #1167 most downloaded on crates.io jamesmunns/cobs.rs

What this package is like to depend on

Last release 5 months ago

03 Mar 2026

Release timing varies

gaps range from 4 months to 3.2 years

Some releases are documented

notes for 4 of 12 stable releases

Nothing withdrawn

no release was ever pulled

11 years old

12 releases · first in 2015

2 releases in the last 12 months

see the full history below

Release timeline

12 releases · Aug 2015 to Mar 2026
2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 12
  1. 0.5.1 03 Mar 2026
    Release notes

    Changed

    • Bumped MSRV to Rust 1.87 to allow heapless update, #63
    • More efficient decoding implementation:
      #67 and #68.
    Open source →
    Release notes

    Changed

    • Bumped MSRV to Rust 1.87 to allow heapless update, #63
    • More efficient decoding implementation: #67 and #68.
    Open source →
  2. 0.5.0 21 Oct 2025
    Release notes
    • Introduce MSRV, which is Rust 1.86
    • Move to Rust edition 2024

    Added

    • New API to encoded data including the sentinel bytes:
      • encode_including_sentinels
      • try_encode_including_sentinels
      • encode_vec_including_sentinels
    • CobsDecoderOwned which owns the decoding buffer and does not require lifetimes.
    • CobsDecoderHeapless which owns the heapless decoding buffer and does not require lifetimes.
    Open source →
    Release notes
    • Introduce MSRV, which is Rust 1.86
    • Move to Rust edition 2024

    Added

    • New API to encoded data including the sentinel bytes:
      • encode_including_sentinels
      • try_encode_including_sentinels
      • encode_vec_including_sentinels
    • CobsDecoderOwned which owns the decoding buffer and does not require lifetimes.
    • CobsDecoderHeapless which owns the heapless decoding buffer and does not require lifetimes.
    Open source →
  3. 0.4.0 21 Jun 2025
    Release notes

    Fixed

    • The encoder functions will now encode empty input into a single 0x01 byte.
      #49

    Changed

    • Bumped defmt dependency to v1
      #51
    • decode now returns the DecodeReport structure which contains both the frame size
      and the parsed size.
      #50
    • CobsDecoder::push also returns a DecodeReport now.
      #50
    • The DecodeReport structure now has frame_size and parsed_size getter methods instead
      of public src_used / dst_used fields.
      #50
    • The CobsDecoder is now able to continuously parse data without having to re-create
      it after each parsed packet.
      #50
    Open source →
    Release notes

    Fixed

    • The encoder functions will now encode empty input into a single 0x01 byte. #49

    Changed

    • Bumped defmt dependency to v1 #51
    • decode now returns the DecodeReport structure which contains both the frame size and the parsed size. #50
    • CobsDecoder::push also returns a DecodeReport now. #50
    • The DecodeReport structure now has frame_size and parsed_size getter methods instead of public src_used / dst_used fields. #50
    • The CobsDecoder is now able to continuously parse data without having to re-create it after each parsed packet. #50
    Open source →
  4. 0.3.0 31 Jan 2025
    Release notes

    This release (the first in a very long time) has been led by @robamu - huge thanks to him for making this happen!

    What's Changed

    New Contributors

    Full Changelog: v0.2.3...v0.3.0

    Open source →
    Release notes

    Added

    • Added max_encoding_overhead const function. #20
    • Unittests for decode_in_place and decode_in_place_report. #36
    • New alloc feature which enables support for APIs returning Vecs. #24
    • New std feature, deprecate the use_std feature but keep it for backwards compatiblity. #38
    • Documentation of the new std and alloc features in the README. #38
    • Optional defmt support feature-gated by the optional defmt feature. #40
    • Add optional serde support that adds serde derives for some errors and data structures. #41

    Changed

    • Bumped rust edition to 2021
    • Improved error handling by replacing unit errors with a new DecodeError enumeration for the decoding module and a DestBufTooSmallError for the encoding module. #30
    • max_encoding_length is now a const function. #20
    • decode_in_place and decode_in_place_report now check the destination index and return an appropriate DecodeError instead of panicking if an out-of-bounds access happens. #36
    • Consistent behaviour of decode functions for empty input: All funtions now return DecodeError::FrameEmpty. #39

    Fixed

    • Fixed wrong encoded length when source length was divisible by 254. #19
    Open source →
  5. 0.2.3 14 Jun 2022

    Nothing published for this version

  6. 0.2.2 14 Jun 2022

    Nothing published for this version

  7. 0.2.1 14 Jun 2022

    Nothing published for this version

  8. 0.2.0 14 Jun 2022

    Nothing published for this version

  9. 0.1.4 02 Apr 2019

    Nothing published for this version

  10. 0.1.3 21 Dec 2017

    Nothing published for this version

  11. 0.1.2 15 Jan 2016

    Nothing published for this version

  12. 0.1.1 05 Aug 2015

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive