def read.footer.state
mylsm-lsm-store@0.6.0.1 · src/SstStreamIo.bend:280
import mylsm-lsm-store@0.6.0.1/src/SstStreamIo.bend as SstStreamIo
import Base
import mylsm-lsm-store@0.6.0.1/src/SstFile.bend as SstFile
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
280def read.footer.state(
281 pair: File & Result<&1, &1, U32 & String, Bytes.Bytes>,
282 +size: Nat,
283 +used: Nat,
284 parser: SstFile.StreamState
285) -> StreamReadState:
286 match pair:
287 case (file, Fail{error}):
288 ReadClose{file, Fail{error}}
289 case (file, Done{bytes}):
290 read.footer.size(file, parser, bytes,
291 Nat.is_eq(Nat.add(used, 40n), size))