Artifact
8d65bed5494a556b499e57a9726b78bf7df4eee4:
Attachment "testgzip.tcl" to
ticket [3390073fff]
added by
rich123
2011-08-12 08:31:38.
puts "Tcl[ info patchlevel ]"
set zeros [ open /dev/zero {RDONLY BINARY} ]
foreach size {8191 8192} {
set data [ read $zeros $size ]
set fout [ open $size {WRONLY CREAT BINARY} ]
puts -nonewline $fout $data
close $fout
set fin [open $size rb]
set header [dict create filename $size time [file mtime $size] comment "Created by Tcl[info patchlevel]"]
set fout [zlib push gzip [open $size.gz wb] -header $header]
fcopy $fin $fout
close $fin
close $fout
}
close $zeros