zebra_chain::serialization

Module compact_size

source
Expand description

Types and serialization for the Bitcoin CompactSize format.

Zebra decodes CompactSize fields into two different types, depending on the consensus rules that apply to that type:

  • CompactSizeMessage for sizes that must be less than the network message limit, and
  • CompactSize64 for flags, arbitrary counts, and sizes that span multiple blocks.

Structsยง

  • An arbitrary CompactSize-encoded field. Used for flags, arbitrary counts, and sizes that span multiple blocks.
  • A CompactSize-encoded field that is limited to MAX_PROTOCOL_MESSAGE_LEN. Used for sizes or counts of objects that are sent in network messages.