 TYPED: checksum-header ( seq: byte-array -- n )
     148 cut-slice 8 tail-slice [ 0 [ + ] reduce ] bi@ + 256 + >fixnum ;
 
-: read-data-blocks ( tar-header -- )
+: read-data-blocks ( header -- )
     dup size>> 0 > [
         block-size read [
             over size>> dup block-size <= [

        ] if*
    ] [
        drop
    ] if ;

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


ERROR: unknown-typeflag ch ;

M: unknown-typeflag summary
    ch>> [ "Unknown typeflag: " ] dip prefix ;

: read/write-blocks ( header path -- )
    binary [ read-data-blocks ] with-file-writer ;

: prepend-current-directory ( path -- path' )
