Skip to content

Releases: mas-bandwidth/serialize.java

serialize.java 1.1.0: format version 1.1

Choose a tag to compare

@gafferongames gafferongames released this 04 Sep 07:51
6c47905

This release brings the Java runtime to format version 1.1 of the wire standard. int_relative reconstructs every tier in a width that cannot wrap and refuses a result outside 0 to 2^31 - 1 or not strictly above previous; the absolute tier reads its 32 raw bits unsigned and refuses a set top bit; a refused read writes nothing to a scalar destination and is terminal until the stream is re-initialized; a ranged int128 with min equal to max is legal and costs zero bits. The standard's conformance corpus is vendored and every vector runs in the test suite, so this runtime's verdict on hostile bytes is now the same as every other runtime's, and the vendored STANDARD.md and corpus are checked against upstream in CI. The wire is unchanged: every packet a previous release wrote reads the same, and every accepted vector round-trips byte for byte. The read stream now carries a failure latch, the suite runs with assertions on and off, and the vendored standard and corpus are new to this repository.

serialize.java 1.0.0 — the serialize wire on the JVM

Choose a tag to compare

@rowan-claude rowan-claude released this 30 Aug 00:24

The serialize wire on the JVM. This is the first release of serialize.java: the family's bitpacking serializer for Java 17 and up, wire compatible with the C++ serialize library — the same bytes, bit for bit, on every platform.

What you get:

  • The full primitive surface: raw bits, ranged integers through 128 bits, bool, bit-transparent float and double, the compressed float, relative integers, alignment, byte blocks, UTF-8 and wide strings, and fixed point across all storage widths — through write, read, and measure streams over a shared BitStream interface.
  • Byte-identical wire, proven: the port reproduces the reference's golden wire vectors exactly and passes the full sabotage sweep — every consumed bit of the conformance stream is load-bearing, and hostile bytes never throw.
  • Reads validate everything; writes trust the caller, with assert-based contracts that are active under -ea and free at runtime — the asserts live in extracted predicates, so disabled assertions cost the JIT nothing.
  • Zero allocation in steady state: primitive-specialized holder cells and a reset() reuse surface keep the hot paths garbage-free, verified by allocation profiling.
  • Zero dependencies, plain Makefile: make test runs the suite on the pinned JDK, make bench runs the family benchmark, golden gated so it reports nothing on a bad wire.

One contract to know before you wire it in: the reader carries the reference's allocation contract — the buffer must extend at least eight bytes past the data — documented with examples in USAGE.md, which teaches every operation with code that runs.