 : read-c-string ( n -- str )
     read [ zero? ] trim-tail "" like ;
 
-: read-tar-header ( -- tar-header )
+: read-tar-header ( -- header )
     tar-header new
         100 read-c-string >>name
         8 read-c-string trim-string oct> >>mode

TYPED: checksum-header ( seq: byte-array -- n )
    148 cut-slice 8 tail-slice [ 0 [ + ] reduce ] bi@ + 256 + >fixnum ;

: read-data-blocks ( tar-header -- )
    dup size>> 0 > [
        block-size read [
            over size>> dup block-size <= [

        ] if*
    ] [
        drop
    ] if ; inline recursive

: parse-tar-header ( seq -- header )
    dup checksum-header dup zero-checksum = [
        2drop
        tar-header new
