def parse.stream.finish.footer
mylsm-lsm-store@0.6.0.1 · src/ByteSstFile.bend:1574
import mylsm-lsm-store@0.6.0.1/src/ByteSstFile.bend as ByteSstFile
import Base
import mylsm-lsm-store@0.6.0.1/src/hub_sha/sha256.bend as SHA
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
1574def parse.stream.finish.footer(
1575 index_valid: Bool,
1576 header_hash: Bytes.Bytes,
1577 checksums: Bytes.Bytes,
1578 index_hash: Bytes.Bytes,
1579 footer: Bytes.Bytes,
1580 +total: U32
1581) -> Result<&1, &1, Error, Unit>:
1582 match index_valid:
1583 case False{}: Fail{Malformed{}}
1584 case True{}:
1585 parse.stream.finish.footer.compare(Bytes.eq(footer,
1586 Bytes.concat([footer.magic(), u32.bytes(total),
1587 SHA.sha256_packed_bytes(Bytes.concat([header_hash, checksums,
1588 index_hash]))])))