A binary serialization format and compiler optimized for speed and size, generating code from schema definitions.
Colfer is a binary serialization format and compiler that generates source code from schema definitions to marshal and unmarshal data structures. It is optimized for speed and size, making it ideal for efficient data exchange in networked applications and storage systems. The format is designed to be robust against malicious input and includes built-in size protection.
Developers working on performance-sensitive applications requiring efficient binary serialization, such as networked services, data pipelines, or embedded systems. It is particularly useful for teams using multiple programming languages (C, Go, Java, JavaScript) who need consistent serialization across stacks.
Colfer offers superior performance and smaller payloads compared to alternatives like Protocol Buffers, with no external dependencies and strong security guarantees. Its schema compiler generates lightweight, type-safe code, reducing runtime overhead and simplifying integration.
binary serialization format
Benchmarks cited in the README show Colfer outperforms competitors in serialization speed and produces smaller payloads, treating suboptimal performance as a bug.
Includes size protection against malicious input and memory bombs, ensuring predictable memory consumption for untrusted data sources like network I/O.
Generated code relies only on core libraries, simplifying deployment and reducing runtime overhead across all supported languages.
Generates type-safe code for C, Go, Java, and JavaScript from a single schema, enabling consistent serialization in polyglot environments.
Key languages like Rust and Python are still TODO or community ports, lacking official support, which can hinder adoption in diverse tech stacks.
Maximum of 127 fields per struct and no support for enumerations, as admitted in the README, making it unsuitable for complex data models.
Backwards compatibility requires adding new fields only at the end, and the format is under revision (v2 in TODO's), indicating potential breaking changes.
colfer is an open-source alternative to the following products:
RxJava – Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM.
a fast, scalable, multi-language and extensible build system
A high performance caching library for Java
A high-performance 100% compatible drop-in replacement of "encoding/json"
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.