cobs_codec 1.0.0
cobs_codec: ^1.0.0 copied to clipboard
Consistent Overhead Byte Stuffing (COBS) and COBS/R codecs for zero-free, low-overhead framing of serial, UART and packet byte streams.
Changelog #
All notable changes to this package are documented here. This project adheres to Semantic Versioning.
1.0.0 #
Initial release.
Added #
- Basic COBS encoding and decoding: the cobs codec plus the
cobsEncodeandcobsDecodefunctions. - COBS/R (Reduced) encoding and decoding: the
cobsrcodec plus thecobsrEncodeandcobsrDecodefunctions. COBS/R often removes the trailing overhead byte for smaller messages. dart:convertintegration:CobsCodec/CobsrCodecextendCodec, and the encoders/decoders extendConverterwith chunked-conversion support, so they compose withfuse,Stream.transform, and other codecs.- Stream framing for
0x00-delimited links (serial, UART, USB-CDC):cobsFrame,cobsUnframe, and theCobsFrameEncoder/CobsFrameDecoderstream transformers.CobsFrameDecoderreassembles packets across arbitrary chunk boundaries, propagates pause/resume/cancel to the source (even during a delimiter-less run), supports amaxFrameLengthbound against unbounded buffering on a noisy or malicious link, and offers configurable handling of empty and malformed frames. - Size helpers:
encodingOverheadandmaxEncodedLengthfor buffer pre-allocation. - Extensive test suite, including the golden vectors from the reference COBS and COBS/R implementations.