def parse.footer.magic

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

import mylsm-lsm-store@0.6.0.1/src/SstFile.bend as SstFile
import Base
import mylsm-lsm-store@0.6.0.1/src/MemTable.bend as MemTable
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

1110def parse.footer.magic(
1111  pair: Bytes.Cursor & Maybe<&2, U32>,
1112  +level: U32,
1113  +total: U32,
1114  +block_count: U32,
1115  entries: List<&2, MemTable.Entry>,
1116  hashes: List<&1, Bytes.Bytes>
1117) -> Result<&1, &1, Error, Sstable.Table>:
1118  match pair:
1119    case (cursor, Some{1162757171}):
1120      parse.footer.count(Bytes.Cursor.u32be(cursor), level, total,
1121        block_count, entries, hashes)
1122    case (_, _):
1123      Fail{Malformed{}}

Uses (16)

Used by (4)