Zlib.gz.xlen: def of bend-kit-zlib@0.5.1.0 Import: import bend-kit-zlib@0.5.1.0/zlib.bend as Zlib Lines 553-561 of bend-kit-zlib@0.5.1.0/zlib.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-zlib@0.5.1.0/zlib.bend&start_line=553&end_line=561 import Base import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes # RFC 1952 ยง2.3: after the fixed 10 bytes, optional FEXTRA, FNAME, FCOMMENT, FHCRC. # Each step takes the buffer and the offset so far; None once a field runs past the end. def gz.xlen(+off: U32, r: Bytes.Bytes & Maybe<&2, U32>) -> Bytes.Bytes & Maybe<&2, U32>: (b, m) = r match m: case None{}: (b, None{}) case Some{+x}: (b, Some{(off + 2 + x : U32)}) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes