def cd.head.of

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

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

183def cd.head.of(err: Maybe<&2, String>, a: Array<U32>, +h: List<&2, U32>, +p: U32, +cdoff: U32, acc: List<&2, Header>) -> Array<U32> & Result<&1, &1, U32 & String, U32 & List<&2, Header>>:
184  match err:
185    case Some{m}:
186      (a, Fail{(22, m)})
187    case None{}:
188      +next = (p + 46 + u16(h, 28) + u16(h, 30) + u16(h, 32) : U32)
189      lh.at(Bytes.fits(cdoff, u32(h, 42), 30), a, h, p, next, cdoff, acc)

Uses (14)

Used by (1)