PackedFormat
Compact BinaryFormat optimized for small, flat Kotlin data classes.
Features:
Booleans and nullability encoded as compact bitmasks in a class header.
Optional varint / zig-zag encoding via
@PackedTypeannotations, or globally via PackedConfiguration.Fixed, deterministic field order based on declaration.
Limitations:
Nested objects and collections are supported, but do not share bitmasks across structural boundaries.
Polymorphism support is limited/unoptimized compared to full-featured formats.
Use the PackedFormat builder function to create a customized instance.
Inheritors
Constructors
Types
Default instance using IntPacking.DEFAULT (unsigned varint) for all unannotated Int/Long fields.
Properties
Functions
Decodes bytes produced by PackedFormat back into an object of type T.
PackedFormat
configuration
decodeFromByteArray
Decodes bytes produced by PackedFormat back into an object of type T.