Skip to main content

Module codec

Module codec 

Source
Expand description

Wire codec for hotmint P2P messages.

Applies optional zstd compression based on payload size:

[0x00][raw postcard]     — uncompressed (small messages)
[0x01][zstd bytes]       — zstd-compressed postcard

This is part of the hotmint wire protocol — all node implementations (regardless of P2P library) must support this format.

Enums§

DecodeError
EncodeError

Functions§

decode
Decode a wire frame: check tag byte, optionally decompress, then postcard-decode.
encode
Serialize a value to postcard, then conditionally zstd-compress.