def parse.file.header

mylsm-lsm-store@0.6.0.1 · src/SstFile.bend:1726

import mylsm-lsm-store@0.6.0.1/src/SstFile.bend as SstFile
import Base
import mylsm-lsm-store@0.6.0.1/src/Sstable.bend as Sstable
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes

1726def parse.file.header(
1727  pair: Bytes.Cursor & Result<&1, &1, Error, SstHeader>
1728) -> Result<&1, &1, Error, Sstable.Table>:
1729  match pair:
1730    case (_, Fail{error}):
1731      Fail{error}
1732    case (cursor, Done{SstHdr{+level, +total, +block_count}}):
1733      parse.blocks.start(cursor, True{}, block_count, total, level)

Uses (9)

Used by (1)