def open.header.index
mylsm-lsm-store@0.6.0.1 · src/scan/ByteBlockReader.bend:294
import mylsm-lsm-store@0.6.0.1/src/scan/ByteBlockReader.bend as ByteBlockReader
import Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
294def open.header.index(
295 file: File,
296 +size: Nat,
297 header: Bytes.Bytes,
298 total: U32,
299 block_count: U32,
300 index_offset: Nat,
301 valid: Bool
302) -> IO(Result<&1, &1, U32 & String, Reader>):
303 match valid:
304 case False{}:
305 open.failed(file, corruption("byte SST index exceeds file bounds"))
306 case True{}:
307 open.hashes(file, size, header, total, block_count, index_offset)