def parse.multi.step.address
mylsm-lsm-store@0.6.0.1 · src/ByteSstFile.bend:1794
import mylsm-lsm-store@0.6.0.1/src/ByteSstFile.bend as ByteSstFile
import Base
import mylsm-lsm-store@0.6.0.1/src/ByteMemTable.bend as ByteMemTable
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
1794def parse.multi.step.address(
1795 offsets: Nat & Nat,
1796 positions: Nat & Nat,
1797 file: Bytes.Bytes,
1798 block_count: Nat,
1799 level: U32,
1800 total: Nat,
1801 decoded: Nat,
1802 table: ByteMemTable.Table
1803) -> Result<&1, &1, Error, MultiRead>:
1804 match offsets:
1805 case (index_offset, retained_offset):
1806 match positions:
1807 case (next_block, retained_block):
1808 parse.multi.block.offset(Bytes.get.u32be(file,
1809 U32.from_nat(Nat.add(Nat.add(index_offset, 8n),
1810 Nat.mul(next_block, 16n)))), retained_offset, retained_block,
1811 block_count, level, total, decoded, table)