def header.entry_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
144def header.entry_count(pair: Bytes.Bytes & Maybe<&2, U32>) -> Result<&1, &1, Error, Header>:
145 match pair:
146 case (input, value):
147 match value:
148 case None{}: Fail{InvalidFormat{}}
149 case Some{entry_count}:
150 header.entry_count.checked(input, U32.is_le(entry_count, 1048576))