Module encoding

Module encoding 

Source
Expand description

Binary encoder/decoder for the Loro protocol wire format.

Follows the field order and validation rules from protocol.md and matches the JS implementation in packages/loro-protocol/src/encoding.ts.

Functionsยง

decode
encode
Encode a ProtocolMessage into a compact binary form according to protocol.md.
try_decode
Attempt to decode a message, returning None when parsing fails.