A fast and efficient binary object graph serialization and cloning framework for Java.
Kryo is a Java framework for fast binary serialization and cloning of object graphs. It enables efficient persistence of objects to storage or transmission over networks, and provides direct object-to-object copying capabilities. The library focuses on minimizing serialized size and maximizing throughput.
Java developers needing high-performance serialization for networking, caching, or data persistence, especially in performance-sensitive applications like game engines, distributed systems, or high-frequency data processing.
Developers choose Kryo for its exceptional speed, small serialized footprint, and flexible serializer framework, which together offer superior performance compared to standard Java serialization and many other libraries.
Java binary serialization and cloning: fast, efficient, automatic
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Kryo is optimized for speed with efficient binary formats, consistently outperforming standard Java serialization in benchmarks, as shown in the README's performance charts.
Enables direct deep and shallow copying between objects without intermediate byte conversion, reducing overhead for cloning operations compared to serialization-based approaches.
Handles circular references and duplicate objects within graphs automatically, simplifying serialization of complex object structures without manual tracking.
Offers a pluggable architecture with many built-in serializers and support for custom implementations, allowing fine-grained control over serialization behavior.
Uses variable-length encoding for integers and longs to minimize serialized size, improving efficiency for network transmission and storage, as detailed in the IO section.
Primarily designed for Java interoperability, with no built-in support for standardized cross-language formats, limiting its use in polyglot or microservices environments.
Requires manual class registration and serializer setup, which can be verbose and error-prone, especially for large or dynamically loaded codebases, adding initial development overhead.
Major version updates explicitly break serialization compatibility, as stated in the versioning policy, making upgrades potentially disruptive and requiring careful testing.
Allowing unregistered classes introduces security risks by enabling arbitrary class instantiation from serialized data, a concern highlighted in the optional registration section.