LegacyWal.replay.frame.measured: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/transfer/LegacyWal.bend as LegacyWal Lines 296-311 of mylsm-lsm-store@0.6.0.1/src/transfer/LegacyWal.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/LegacyWal.bend&start_line=296&end_line=311 import Base import mylsm-lsm-store@0.6.0.1/src/Wal.bend as Wal import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes def replay.frame.measured( bytes: Bytes.Bytes, batches: List<&2, Wal.Batch>, total: Nat, offsets: Nat & Nat, lengths: Nat & Nat ) -> ReplayState: match offsets: case (slice_offset, end_offset): match lengths: case (end_length, slice_length): +frame_end = Nat.add(end_offset, end_length) +frame_start = Nat.sub(slice_offset, 4n) +serialized_length = Nat.add(slice_length, 4n) ReplayFrame{bytes, frame_start, frame_end, batches, U32.from_nat(serialized_length), Nat.is_le(frame_end, total)} Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List 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.is_le 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=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.from_nat https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/Wal.bend&name=Batch https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/LegacyWal.bend&name=ReplayState