Skip to content

Releases: firechip/cobs_codec

cobs_codec 1.2.0

Choose a tag to compare

@ajsb85 ajsb85 released this 05 Jul 06:01
v1.2.0
0e9a9db

cobs_codec 1.2.0 (Dart)

Additive, backward-compatible release — the dart:convert Codec contract is unchanged, and the output is byte-identical to the Rust, Kotlin, and Swift members of the Firechip COBS family.

✨ New features

  • In-place COBS/R decodecobsrDecodeInPlace / cobsrDecodeInPlaceWithSentinel decode the reduced codec within the caller's Uint8List and return the decoded length, needing no output buffer (COBS/R never expands the data).

🔧 Tooling

  • A dependency-free throughput benchmark (benchmark/cobs_benchmark.dart, excluded from the published package) that runs on every supported SDK.
  • Conformance now also covers the configurable-sentinel and decode-error vectors.

📦 Install

dart pub add cobs_codec

pub.dev: https://pub.dev/packages/cobs_codec/versions/1.2.0

The attached cobs_codec-1.2.0.tar.gz is the exact published package archive (from pub.dev).

✅ Verified & published

First release published via pub.dev automated publishing (OIDC) from GitHub Actions on the v1.2.0 tag — no static credentials. Conformance vectors byte-identical to the shared suite and the Rust / Kotlin / Swift siblings.

cobs_codec 1.1.0

Choose a tag to compare

@ajsb85 ajsb85 released this 04 Jul 16:55
v1.1.0
2ea7597

cobs_codec 1.1.0 (Dart)

Three new capabilities for the pure-Dart COBS / COBS-R codecs — all additive and backward compatible (the dart:convert Codec contract is unchanged), and byte-identical to the Rust and Kotlin members of the Firechip COBS family.

✨ New features

Configurable delimiter (sentinel)cobsEncodeWithSentinel / cobsDecodeWithSentinel (and the cobsr* pair) make the output avoid any chosen byte, so it can delimit frames instead of 0x00. sentinel == 0 is byte-for-byte identical to the plain codec, and decoding never mutates its input.

cobsEncodeWithSentinel([0x11, 0x22, 0x00, 0x33], 0xAA); // [0xA9, 0xBB, 0x88, 0xA8, 0x99] — no 0xAA

In-place decode (basic COBS) — cobsDecodeInPlace(Uint8List buffer) decodes within the buffer and returns the decoded length; the bytes are Uint8List.sublistView(buffer, 0, n).

Sentinel-aware framingcobsFrame / cobsUnframe and both stream transformers (CobsFrameEncoder / CobsFrameDecoder) take an optional sentinel named parameter.

📦 Install

dart pub add cobs_codec

pub.dev: https://pub.dev/packages/cobs_codec/versions/1.1.0

The attached cobs_codec-1.1.0.tar.gz is the exact published package archive.

✅ Verified

pana 160 / 160; dart analyze --fatal-infos + tests green on Dart stable and 3.5.0; conformance vectors byte-identical to the shared suite and the Rust / Kotlin siblings.

cobs_codec 1.0.0 (Dart)

Choose a tag to compare

@ajsb85 ajsb85 released this 03 Jul 19:01
v1.0.0
02fcee7

First release of cobs_codec — Consistent Overhead Byte Stuffing (COBS) and COBS/R for Dart & Flutter.

Highlights

  • Basic COBS and COBS/R (Reduced) encode/decode, byte-for-byte identical to the reference implementations (validated by 20,000-vector differential testing against cobs-python).
  • dart:convert nativecobs / cobsr are Codecs that fuse with json/utf8/base64 and support chunked conversion.
  • Stream framing for 0x00-delimited serial/UART links: cobsFrame, cobsUnframe, and the CobsFrameEncoder / CobsFrameDecoder transformers. The decoder reassembles packets across arbitrary chunk boundaries, propagates pause/resume/cancel to the source, and bounds buffering with maxFrameLength.
  • Zero dependencies, all 6 platforms (mobile, desktop, web, server), wasm-ready.

Quality

  • 45 tests, strict static analysis (0 issues), pana 160/160.

Install

dependencies:
  cobs_codec: ^1.0.0

pub.dev: https://pub.dev/packages/cobs_codec/versions/1.0.0

The attached cobs_codec-1.0.0.tar.gz is the exact published package archive (from pub.dev).

See the CHANGELOG and README for details.