def parse.header.magic.two

mylsm-lsm-store@0.6.0.1 · src/SstFile.bend:1616

import mylsm-lsm-store@0.6.0.1/src/SstFile.bend as SstFile
import Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes

1616def parse.header.magic.two(
1617  pair: Bytes.Cursor & Maybe<&2, U32>
1618) -> Bytes.Cursor & Result<&1, &1, Error, SstHeader>:
1619  match pair:
1620    case (cursor, Some{1295209216}):
1621      parse.header.level(Bytes.Cursor.u32be(cursor))
1622    case (cursor, _):
1623      (cursor, Fail{Malformed{}})

Uses (13)

Used by (1)