def headers.at

bend-kit-archive@0.5.1.0 · archive.bend:242

import bend-kit-archive@0.5.1.0/archive.bend as Archive
import Base

242def headers.at(short: Bool, a: Array<U32>, +len: U32) -> Array<U32> & Result<&1, &1, U32 & String, List<&2, Header>>:
243  match short:
244    case True{}:
245      (a, Fail{(22, "input is shorter than an end of central directory record")})
246    case False{}:
247      +p = (len - 22 : U32)
248      eocd.found(eocd.go(U32.to_nat(U32.min(p, 65535)), eocd.win(a, len, p), len, p))

Uses (15)

Used by (1)