Package Exports
- @coderbuzz/proto
Readme
Proto — @coderbuzz/proto
Binary serialization for TypeScript. Smaller than Protobuf. No .proto files. Zero per-field overhead.
Compiles high-performance binary codecs from @coderbuzz/kyo schema validators at runtime. No field names, no type tags, no per-field headers — just pure payload data.
Why Proto Over Standard Protobuf?
- No
.protofiles — schemas are TypeScript validators from@coderbuzz/kyo - Zero per-field overhead — Protobuf adds tag + wire type per field; Proto adds nothing
- Smaller than MessagePack — no type tags on every value
size()pre-calculation — exact byte count without encoding- Literals are 0 bytes — value known from schema
- Unions in 1 byte — variant index prefix instead of Protobuf's oneof wrapper
Installation
npm install @coderbuzz/proto @coderbuzz/kyoQuick Start
import { proto } from "@coderbuzz/proto";
import { object, string, number } from "@coderbuzz/kyo";
const User = object({ name: string(), age: number() });
const codec = proto(User);
const bytes = codec.encode({ name: "Alice", age: 30 });
// Binary — no field names, no tags, just payload
const user = codec.decode(bytes);
// => { name: "Alice", age: 30 }Documentation
Full API reference, wire format details, and type reference: DOCS.md
License
MIT © 2026 Indra Gunawan