Skip to main content

Module physical

Module physical 

Source

Structs§

PageEntry
A single page entry within a changeset.
PhysicalChangeset
A complete physical changeset: header + pages + checksum.
PhysicalHeader
Header for a physical changeset.

Enums§

PageId
A page ID that can be either u32 or u64.
PageIdSize
Page ID byte width. Stored in the header so the format is self-describing.

Constants§

HADBP_MAGIC
HADBP_VERSION

Functions§

compute_checksum
Compute checksum for a physical changeset. SHA-256(prev_checksum_be || page_id_be || data_len_be || data …) truncated to u64. Pages are sorted by page_id for determinism.
decode
Decode a physical changeset from binary data. Validates magic, version, and recomputes checksum.
encode
Encode a physical changeset into binary format.
verify_chain
Verify that a changeset’s checksum matches the expected chain.