Annotation-driven binary protocol serialization for Java.
Designed for IoT, automotive, industrial control & energy metering.
What is FastProto?
FastProto is a high-performance Java library for binary protocol serialization and deserialization. Define complex byte-stream structures with annotations — no manual bit-shifting, no boilerplate. Built for production use cases including IoT gateways, CAN bus parsers, UART framing and Modbus register mapping.
Key features
Map binary data to Java fields via simple annotations.
Primitives, unsigned, strings, time, arrays and collections.
Reverse addressing for variable-length packets.
Big-endian or little-endian; MSB/LSB bit ordering.
Apply lambdas or classes to transform values on encode/decode.
Single annotation: CRC8/16/32/64, LRC, XOR, sum.
Fluent builder and static helpers for all use cases.
Annotate fields, call FastProto.decode — done.
import org.indunet.fastproto.FastProto;
import org.indunet.fastproto.annotation.UInt8Type;
public class Packet {
@UInt8Type(offset = 0) int id;
}
byte[] bytes = new byte[]{1};
Packet p = FastProto.decode(bytes, Packet.class);
byte[] out = FastProto.encode(p, 1);Guides to get you up and running:
Available on Maven Central. Requires Java 8+.
Maven
<dependency>
<groupId>org.indunet</groupId>
<artifactId>fastproto</artifactId>
<version>4.1.0</version>
</dependency>Gradle
implementation "org.indunet:fastproto:4.1.0"Open source. Released under the Apache License 2.0. Source on GitHub. Artifacts on Maven Central.