#5 zipvfs fails to decompress file contents

v1.0 (example)

This problem is showing with the current tclkit build
which includes tclvfs v1.0 (as I understand). The
of a mounted zip file aren't decompressed. The
following script should just cat the first file in a
zip archive:

package require zipvfs

set ::vfs::debug 10

proc zipcat {file} {
puts "mounting $file"
vfs::zip::Mount $file $file
set files [glob -type f [file join $file *]]
puts "Got [llength $files] files"

puts "Opening [lindex $files 0]"
set h [open [lindex $files 0]]
set contents [read $h]
close $h
return $contents


puts [zipcat [lindex $argv 0]]

but with tclkit we get binary data. The debug log shows
that the call to vfs::zip is failing due to an argument

I can see that this is perhaps due to the replacement
of vfs::zip in tclkit -- I don't have a working Trf but
perhaps it
understands the -nowrap flag. Removing the -nowrap flag
so that vfs::zip is called doesn't help, then I get a
failure due
to data format.

This is being copied to JCW in case it's really Tclkit


  • Steve Cassidy

    Steve Cassidy - 2002-09-16

    Logged In: YES

    this turned out to be a tclkit bug in the code JCW uses to
    mimic Trf with rchan

  • Vince Darley

    Vince Darley - 2002-09-26
    • assigned_to: nobody --> jcw
    • status: open --> closed-fixed
  • Vince Darley

    Vince Darley - 2002-09-26

    Logged In: YES

    I'm assuming jcw fixed this in tclkit.

  • Anonymous - 2002-09-26

    Logged In: YES

    No, it's not tclkit-specific.

    In vfslib.tcl, I fixed/hacked the "vfs::zip" command
    emulation to recognize -nowrap as option, which is used in
    zipvfs (not mk4vfs). See line 19:
    # kludge to allow "-nowrap 1" as second option, 5-9-2002

    The -nowrap flag is Trf's way of specifying compress vs.
    deflate as method. An unfortunate API difference...


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks