Skip to content

Releases: firechip/cobs_codec_kt

cobs_codec 1.2.0 (Kotlin/Android)

Choose a tag to compare

@github-actions github-actions released this 04 Jul 22:55
v1.2.0
7d4befe

cobs_codec 1.2.0 (Kotlin / Android)

Additive, backward-compatible release — byte-identical to the Rust, Dart, and Swift members of the Firechip COBS family.

✨ New features

  • java.io framing streamsCobsFramedOutputStream / CobsFramedInputStream write and read 0x00-delimited COBS frames over any OutputStream / InputStream.
  • Coroutines Flow APIFlow<ByteArray>.cobsFrames() frames a flow of packets. kotlinx-coroutines is compileOnly, so no runtime dependency is imposed on consumers that don't use it.
  • In-place COBS/R decodeCobsr.decodeInPlace (with a sentinel overload) decodes the reduced codec within the same buffer.

🔧 Tooling

  • An (env-gated) JVM throughput micro-benchmark.
  • Conformance now also covers the configurable-sentinel and decode-error vectors.

📦 Install

Published to GitHub Packages (Maven) as dev.firechip:cobs_codec — declare the GitHub Packages repository, then:

implementation("dev.firechip:cobs_codec:1.2.0")

Or drop in the attached artifact directly, no repository needed:

implementation(files("libs/cobs_codec-1.2.0.aar"))

The attached cobs_codec-1.2.0.aar is the exact published Android library.

cobs_codec 1.1.0

Choose a tag to compare

@github-actions github-actions released this 04 Jul 16:08
v1.1.0
904d80a

cobs_codec 1.1.0 (Kotlin / Android)

Three new capabilities for the pure-Kotlin COBS / COBS-R library — all additive and backward compatible (existing 1.0.0 signatures are untouched), and byte-identical to the Rust and Dart members of the Firechip COBS family.

The Maven artifact is dev.firechip:cobs_codec; the _kt suffix is only the repository slug.

✨ New features

Configurable sentinelCobs/Cobsr.encodeWithSentinel / decodeWithSentinel frame on any delimiter byte instead of 0x00; the encoded output never contains the sentinel byte. sentinel == 0 is byte-for-byte identical to the plain codec.

val s = 0xAA.toByte()
val stuffed = Cobs.encodeWithSentinel(byteArrayOf(0x11, 0x00, 0x22), s) // [0xA8,0xBB,0xA8,0x88] — no 0xAA
Cobs.decodeWithSentinel(stuffed, s)                                     // [0x11,0x00,0x22]

In-place decode (basic COBS) — Cobs.decodeInPlace(buffer) decodes within the same ByteArray with no second allocation and returns the decoded length.

Sentinel-aware framingCobsFraming.frame / unframe and the CobsStreamDecoder constructor each take a trailing sentinel: Byte = COBS_DELIMITER, so a whole link can be delimited by any chosen byte.

📦 Install

GitHub Packages Maven (needs a read:packages token):

implementation("dev.firechip:cobs_codec:1.1.0")

Or download the attached cobs_codec-1.1.0.aar and drop it into libs/ — no authentication required.

✅ Verified

Android lint + JUnit unit tests green; conformance vectors byte-identical to the shared suite; the XOR-based sentinel encoding is byte-identical to the Rust and Dart siblings.

cobs_codec 1.0.0 (Kotlin/Android)

Choose a tag to compare

@github-actions github-actions released this 04 Jul 11:05
v1.0.0
673a579

cobs_codec 1.0.0 (Kotlin / Android)

Initial release — pure-Kotlin COBS / COBS-R for Android, packaged as an .aar. Byte-identical to the Dart, Rust, and Swift members of the Firechip COBS family (validated by a 20,000-vector differential test against the reference).

✨ Added

  • Basic COBS and COBS/R encode/decode (Cobs, Cobsr).
  • Stream framing for 0x00-delimited links: CobsFraming.frame / unframe, and the incremental CobsStreamDecoder with a maxFrameLength guard.
  • Size helpers maxEncodedLength / encodingOverhead, and CobsDecodeException for invalid input.

📦 Install

Published to GitHub Packages (Maven) as dev.firechip:cobs_codec — declare the GitHub Packages repository, then:

implementation("dev.firechip:cobs_codec:1.0.0")

Or drop in the attached artifact directly, no repository needed:

implementation(files("libs/cobs_codec-1.0.0.aar"))

The attached cobs_codec-1.0.0.aar is the exact published Android library.