Hasty Briefsbeta

Lite^3, a JSON-Compatible Zero-Copy Serialization Format

7 days ago
  • #zero-copy
  • #serialization
  • #performance
  • Lite³ is a zero-copy binary serialization format encoding data as a B-tree inside a single contiguous buffer.
  • It allows access and mutation on any arbitrary field in O(log n) time, functioning as a serialized dictionary.
  • Lite³ eliminates the need for traditional parsing or serializing, enabling direct read and mutation similar to hashmaps or binary trees.
  • The format is schemaless, self-describing, and supports conversion to/from JSON for compatibility and debugging.
  • Performance benchmarks show Lite³ outperforming the fastest JSON libraries by up to 120x and Google Flatbuffers by 242x.
  • Lite³ provides two APIs: the Buffer API for control over memory allocation and the Context API for ease of use.
  • Security features include overflow-protected bounds checks, runtime type safety, and max recursion limits.
  • Lite³ is suitable for embedded systems and ARM platforms, provided they support int64_t and 8-byte doubles.
  • Future developments include optimization for -flto, built-in defragmentation, and full JSON interoperability.
  • Lite³ is inspired by the Lite² paper but is an independent implementation, named Lite³ for being lighter.