src/scan/BlockIndexFormatPolicy.bend checks
raw source on the hub · import mylsm-lsm-store@0.6.0.0/src/scan/BlockIndexFormatPolicy.bend as BlockIndexFormatPolicy
1 import
import Base
Definitions
def header_bytes source · line 4 · raw
Nat
Describes the fixed-width section sizes of the separator index layout.
def entry_bytes source · line 8 · raw
Nat
Returns the fixed offset/length metadata width for one data block.
def minimum_data_offset source · line 16 · raw
Nat
Returns the earliest valid position after the fixed SST header.
def nat.clone.pair source · line 19 · raw
@+value:Nat -> Pair(Nat, Nat)
def index_bytes source · line 23 · raw
@block_count:Nat -> @separator_bytes:Nat -> Nat
Computes index bytes from fixed records and the packed separator region.
def index_offset source · line 28 · raw
@file_size:Nat -> @index_length:Nat -> Nat
Locates the index from the index length retained in the extended footer.
def interval_valid.copies source · line 32 · raw
@sizes:Pair(Nat, Nat) -> @indices:Pair(Nat, Nat) -> Bool
Checks the index/footer interval without overflowing its containing file.
def interval_valid source · line 45 · raw
@file_size:Nat -> @index_length:Nat -> Bool
Checks the index/footer interval without underflow or header overlap.
def separator_valid source · line 50 · raw
@offset:Nat -> @length:Nat -> @region_length:Nat -> Bool
Checks one separator slice against the packed separator region.