ByteWal.decode.frame.copies: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/ByteWal.bend as ByteWal Lines 926-936 of mylsm-lsm-store@0.6.0.1/src/ByteWal.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteWal.bend&start_line=926&end_line=936 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 # Validates record payload and checksum after parsing a bounded frame header. def decode.frame.copies( pair: Bytes.Bytes & Bytes.Bytes, +count: U32, +total: U32 ) -> Result<&1, &1, Wal.Error, Batch>: match pair: case (checksum_frame, parse_frame): decode.checksum(checksum_frame, total, decode.records.loop(Nat.add(Nat.mul(2n, U32.to_nat(count)), 1n), DecodeNext{parse_frame, 8, U32.to_nat(count), Nil{}})) Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List 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.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_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/ByteWal.bend&name=Batch https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteWal.bend&name=DecodeState https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteWal.bend&name=decode.checksum https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteWal.bend&name=decode.records.loop https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/Wal.bend&name=Error