ByteBlockReader.index.page.decode.root: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/scan/ByteBlockReader.bend as ByteBlockReader Lines 1539-1552 of mylsm-lsm-store@0.6.0.1/src/scan/ByteBlockReader.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/ByteBlockReader.bend&start_line=1539&end_line=1552 import Base import mylsm-lsm-store@0.6.0.1/src/scan/BlockIndexPolicy.bend as BlockIndexPolicy import mylsm-lsm-store@0.6.0.1/src/hub_sha/sha256.bend as SHA def index.page.decode.root( reader: IndexMeta, +offset: Nat, +remaining: Nat, actual_hash: SHA.Stream, root_result: Result<&1, &1, SHA.StreamError, SHA.Stream> ) -> Result<&1, &1, U32 & String, IndexPageData>: match root_result: case Fail{_}: Fail{resource_limit("SST root hash exceeds the SHA-256 input limit")} case Done{next_root_hash}: +page_size = BlockIndexPolicy.read_bytes(remaining) Done{IndexPageData{reader, Nat.add(offset, page_size), Nat.sub(remaining, page_size), actual_hash, next_root_hash}} Uses (13): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/hub_sha/sha256.bend&name=Stream https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/hub_sha/sha256.bend&name=StreamError https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/BlockIndexPolicy.bend&name=read_bytes https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/ByteBlockReader.bend&name=IndexMeta https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/ByteBlockReader.bend&name=IndexPageData https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/ByteBlockReader.bend&name=resource_limit