def parse.block.length.check
mylsm-lsm-store@0.6.0.1 · src/ByteSstFile.bend:1272
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
1272def parse.block.length.check(
1273 block: Bytes.Bytes,
1274 size: U32,
1275 copies: Nat & Nat
1276) -> Result<&1, &1, Error, ByteMemTable.Table>:
1277 match copies:
1278 case (count_length, validation_length):
1279 parse.block.length.valid(block, U32.from_nat(count_length),
1280 U32.is_eq(size, (40 + U32.from_nat(validation_length) : U32)))