def next.body.output

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

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/ByteMemTable.bend as ByteMemTable
import mylsm-lsm-store@0.6.0.1/src/scan/BlockOrder.bend as BlockOrder
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes

1240def next.body.output(
1241  file: File,
1242  state: State,
1243  block_bytes: Bytes.Bytes,
1244  +payload_length: U32,
1245  raw_count: Nat,
1246  copies: List<&1, ByteMemTable.Entry> & List<&1, ByteMemTable.Entry>
1247) -> IO(Result<&1, &1, U32 & String, Step>):
1248  match state:
1249    case State{+size, header, +index_offset, +used, total, block_count,
1250        next_block, decoded, root_hash, index_hash, last_key, selected}:
1251      match copies:
1252        case (for_order, retained):
1253          next.body.output.order(file, size, header, index_offset, used,
1254            total, block_count, next_block, decoded,
1255            root_hash, index_hash,
1256            block_bytes, payload_length, raw_count, retained,
1257            BlockOrder.go(for_order, BlockOrder.empty(last_key)), selected)

Uses (16)

Used by (1)