def read.header.state
mylsm-lsm-store@0.6.0.1 · src/SstStreamIo.bend:139
import mylsm-lsm-store@0.6.0.1/src/SstStreamIo.bend as SstStreamIo
import Base
import mylsm-lsm-store@0.6.0.1/src/SstFile.bend as SstFile
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
139def read.header.state(
140 pair: File & Result<&1, &1, U32 & String, Bytes.Bytes>,
141 +size: Nat
142) -> StreamReadState:
143 match pair:
144 case (file, Fail{error}):
145 ReadClose{file, Fail{error}}
146 case (file, Done{bytes}):
147 read.header.parsed(file, size, SstFile.stream.header(bytes))