def metadata
mylsm-lsm-store@0.6.0.1 · src/scan/ByteBlockReader.bend:116
import mylsm-lsm-store@0.6.0.1/src/scan/ByteBlockReader.bend as ByteBlockReader
import Base
116
117def metadata(reader: Reader) -> Metadata & Reader:
118 match reader:
119 case Reader{file, state}:
120 match state:
121 case State{+size, header, +index_offset, used, +total,
122 +block_count, next_block, decoded, root_hash, index_hash,
123 last_key, selected}:
124 (Metadata{size, total, block_count, index_offset, 0n, 0n},
125 Reader{file, State{size, header, index_offset, used, total,
126 block_count, next_block, decoded, root_hash, index_hash,
127 last_key, selected}})