def file.multi.output.measured
mylsm-lsm-store@0.6.0.1 · src/ByteSstFile.bend:746
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
746def file.multi.output.measured(
747 header_output: Bytes.Bytes,
748 blocks: Bytes.Bytes,
749 checksums: Bytes.Bytes,
750 measured_index: Bytes.Bytes & U32,
751 index_hash: Bytes.Bytes,
752 header_hash: Bytes.Bytes,
753 +total: U32
754) -> Result<&1, &1, Error, Bytes.Bytes>:
755 match measured_index:
756 case (index_output, index_length):
757 Done{Bytes.concat([header_output, blocks, index_output,
758 footer.magic(), u32.bytes(total), u32.bytes(index_length),
759 SHA.sha256_packed_bytes(Bytes.concat([header_hash, checksums,
760 index_hash]))])}