 
 <PRIVATE
 
-: write-header ( len -- )
-    dup "Length: %d, %xh\n" printf ;
-
-CONSTANT: line# "00000000h: "
+CONSTANT: line# "00000000  "
 
 : inc-line# ( -- )
     7 [ CHAR: 0 = over 0 > and ] [

    ] do while drop ;

: reset-line# ( -- )
    7 [ CHAR: 0 swap line# set-nth ] each-integer ;

CONSTANT: hex-digits $[
    256 <iota> [ >hex 2 CHAR: 0 pad-head " " append ] map

    ] unless-zero ; inline

: write-ascii ( from to bytes stream -- )
    dup stream-bl '[
        [ printable? ] keep CHAR: . ? _ stream-write1
    ] each-byte ; inline

TYPED: write-hex-line ( from: fixnum to: fixnum bytes: byte-array -- )
    line# write inc-line# output-stream get {
