def replay.measured
import mylsm-lsm-store@0.6.0.1/src/transfer/LegacyWal.bend as LegacyWalimport Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
389# Derives replay fuel from the source size and validates the header before decoding frames.
390def replay.measured(pair: Bytes.Bytes & U32) -> ReplayResult:
391 match pair:
392 case (bytes, size):
393 replay.header.pair(Bytes.slice(bytes, 0, 8),
394 Nat.add(3n, Nat.mul(6n, Nat.div(U32.to_nat(size), 40n))))