def hdr.ck3

bend-kit-tar@0.3.0.0 · tar.bend:341

import bend-kit-tar@0.3.0.0/tar.bend as Tar
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

341# The checksum's eight bytes count as spaces.
342def hdr.ck3(+len: U32, +i: U32, +sum: U32, +ck: U32, +ok: Bool, +x: U32, r: Array<U32> & U32) -> Bytes.Bytes & Maybe<&2, Hdr>:
343  (a, +w) = r
344  hdr.valid(ok && U32.is_eq(ck, (sum - x - wsum(w) + 256 : U32)), len, i, sum, a)

Uses (14)

Used by (1)