def block.fin.digest.parts

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

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

363# Build one v3 block and its digest over the two header words and payload.
364def block.fin.digest.parts(
365  +count: U32,
366  payload: Bytes.Bytes,
367  +payload_len: U32,
368  pair: Bytes.Bytes & Bytes.Bytes
369) -> EncodedBlock:
370  match pair:
371    case (output_digest, stored_digest):
372      Block{Bytes.concat([u32_bytes(payload_len), u32_bytes(count), payload,
373        output_digest]), stored_digest}

Uses (8)

Used by (1)