def hdr.read
import bend-kit-tar@0.3.0.0/tar.bend as Tarimport Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
365# Cursor.read establishes that all fixed offsets below belong to a complete block.
366def hdr.read(b: Bytes.Bytes, +i: U32) -> Bytes.Bytes & Maybe<&2, Hdr>:
367 Bytes.Bytes{+len, a} = b
368 hdr.sum(len, i, bsum(a, (i >> 2n : U32)))