def decode

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

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

550# The entries in archive order. None for a bad header checksum, a malformed size or PAX record,
551# an entry or its padding cut short, a missing end (two zero blocks), or any type but file,
552# directory, and PAX records. Bytes after the end are ignored.
553# fuel: each header step eats a block, so len / 512 + 2 steps are enough.
554def decode(archive: Bytes.Bytes) -> Maybe<&1, List<&1, Entry>>:
555  Bytes.Bytes{+len, buf} = archive
556  run(U32.to_nat(((len >> 9n) + 2 : U32)), (Bytes.Cursor.new(Bytes.Bytes{len, buf}), SHead{Pax{None{}, None{}}, Nil{}}))

Uses (13)

Used by (0)

No other definition uses this definition.