def parse.header.blocks
mylsm-lsm-store@0.6.0.1 · src/ByteSstFile.bend:941
import mylsm-lsm-store@0.6.0.1/src/ByteSstFile.bend as ByteSstFile
import Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
941def parse.header.blocks(
942 pair: Bytes.Cursor & Maybe<&2, U32>,
943 size: U32,
944 level: U32,
945 total: U32
946) -> Result<&1, &1, Error, PayloadWords>:
947 match pair:
948 case (cursor, Some{1}):
949 parse.header.payload(Bytes.Cursor.u32be(cursor), size, level, total)
950 case _:
951 Fail{Malformed{}}