def open.hash.header

mylsm-lsm-store@0.6.0.1 · src/scan/ByteBlockReader.bend:269

import mylsm-lsm-store@0.6.0.1/src/scan/ByteBlockReader.bend as ByteBlockReader
import Base
import mylsm-lsm-store@0.6.0.1/src/coordinator/QueuePolicy.bend as QueuePolicy
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

269def open.hash.header(
270  file: File,
271  +size: Nat,
272  copies: Bytes.Bytes & Bytes.Bytes,
273  total: U32,
274  block_count: U32,
275  index_offset: Nat
276) -> IO(Result<&1, &1, U32 & String, Reader>):
277  match copies:
278    case (header, for_hash):
279      open.hash.root(file, size, header, total,
280        QueuePolicy.nat.clone.pair(U32.to_nat(block_count)), index_offset,
281        SHA.stream.update(SHA.stream.initial(), for_hash))

Uses (15)

Used by (1)