KISS Java Libraries

KissBinary

Tiny zero-dependency Java 17+ binary IO for explicit primitive formats, memory-mapped reads, header validation, and predictable format errors.

Latest stable: 0.1.0 Java 17+ Apache-2.0

Maven

<dependency>
  <groupId>io.github.arthurhoch</groupId>
  <artifactId>kiss-binary</artifactId>
  <version>0.1.0</version>
</dependency>

Small Surface

KissBinary reads and writes explicit binary data without object serialization, schema compilers, IDL tooling, reflection mapping, or runtime dependencies.

Quick Example

BinaryWriter writer = BinaryWriter.create();
writer.writeMagic("KB");
writer.writeVersion(1);
writer.writeInt(42);

BinaryReader reader = BinaryReader.from(writer.toByteArray());
reader.expectMagic("KB");
reader.expectVersion(1);

KISS Principles

Explicit Format

Magic bytes, versions, endianness, primitive values, and arrays stay under caller control.

Bounds Checked

Malformed input fails with format exceptions instead of silent truncation or hidden defaults.

Measured Paths

JMH benchmarks cover scalar IO, arrays, memory-mapped reads, and Rinha-shaped access patterns.

Documentation

Related Projects