Tcl Source Code

Artifact [dd24b26cc3]
Login

Artifact dd24b26cc3fd756eeeae201484c329211a83bec4:

Attachment "zbug.tcl" to ticket [2762041fff] added by ferrieux 2010-02-23 05:02:30.
set s [string repeat A 5000]
set cs [zlib gzip $s]
puts stderr "Compressed size is [string length $cs]"

foreach {pr pw} [chan pipe] break
fconfigure $pw -buffering full -translation binary
fconfigure $pr -translation binary

puts $pw hahaha
puts -nonewline $pw $cs
flush $pw
close $pw

puts stderr HEADER:[gets $pr]
zlib push gunzip $pr
puts stderr "Now reading through gunzip"
set data [read $pr]
puts stderr "Received [string length $data] out of [string length $s]"