def header.block_count
import mylsm-lsm-store@0.6.0.1/src/transfer/Restore.bend as Restoreimport Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
131def header.block_count(pair: Bytes.Bytes & Maybe<&2, U32>) -> Result<&1, &1, Error, Header>:
132 match pair:
133 case (input, value):
134 match value:
135 case None{}: Fail{InvalidFormat{}}
136 case Some{block_count}:
137 header.block_count.checked(input, U32.is_le(block_count, 65536))