def zlib.result
import gralha-bytes@0.1.0.1/bytes.bend as Bytesimport Base
import gralha-text-scan@0.1.0.1/scan.bend as U
391def zlib.result(result: Inflate, +expected: U32, checksum: U32) -> Maybe<&2, Bytes>:
392 Inflate{stream, output} = result
393 +out = output
394 U.choose(Maybe<&2, Bytes>, bits.valid(stream) && U32.is_eq(bytes.size(out), expected) && U32.is_eq(checksum.adler(out), checksum), Some{out}, None{})