def index.page.decode.actual
mylsm-lsm-store@0.6.0.1 · src/scan/ByteBlockReader.bend:1554
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/hub_sha/sha256.bend as SHA
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
1554def index.page.decode.actual(
1555 reader: IndexMeta,
1556 +offset: Nat,
1557 +remaining: Nat,
1558 root_hash: SHA.Stream,
1559 actual_result: Result<&1, &1, SHA.StreamError, SHA.Stream>,
1560 for_root: Bytes.Bytes
1561) -> Result<&1, &1, U32 & String, IndexPageData>:
1562 match actual_result:
1563 case Fail{_}:
1564 Fail{resource_limit("SST index hash exceeds the SHA-256 input limit")}
1565 case Done{next_actual_hash}:
1566 index.page.decode.root(reader, offset, remaining, next_actual_hash,
1567 SHA.stream.update(root_hash, for_root))