def stream.footer

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

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

1527def stream.footer(state: StreamState, bytes: Bytes.Bytes) -> Result<&1, &1, Error, Sstable.Table>:
1528  match state:
1529    case StreamState{+level, +total, +block_count, 0, 0, _, entries, hashes}:
1530      parse.footer.magic(
1531        Bytes.Cursor.u32be(Bytes.Cursor.new(bytes)), level, total,
1532        block_count, entries, hashes)
1533    case _:
1534      Fail{Malformed{}}

Uses (12)

Used by (1)