Releases: firechip/cobs_codec_kt
Release list
cobs_codec 1.2.0 (Kotlin/Android)
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.ioframing streams —CobsFramedOutputStream/CobsFramedInputStreamwrite and read0x00-delimited COBS frames over anyOutputStream/InputStream.- Coroutines
FlowAPI —Flow<ByteArray>.cobsFrames()frames a flow of packets.kotlinx-coroutinesiscompileOnly, so no runtime dependency is imposed on consumers that don't use it. - In-place COBS/R decode —
Cobsr.decodeInPlace(with asentineloverload) 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
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_ktsuffix is only the repository slug.
✨ New features
Configurable sentinel — Cobs/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 framing — CobsFraming.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)
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 incrementalCobsStreamDecoderwith amaxFrameLengthguard. - Size helpers
maxEncodedLength/encodingOverhead, andCobsDecodeExceptionfor 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.