Skip to content

Consider: Heap-style encoding #369

@gavofyork

Description

@gavofyork

This allows individual data from a serialized blob to be isolated and read easily. It may be combined with a convention on Merklisation in order to allow for individual fields (or their internal data/lengths if variable size) to be proven.

Rather than encoding in a single pass, have a multi-pass encoder where variable-length items are serialized in two fixed-length quantities as item-count and offset.

While fixed-length, both items are expressed according to the schema.

This comes with some cost to the size, since offsets must be encoded and lengths are not compact. In general both would be 32-bit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions