Re: chan copy -command callback not executed

jdc <[email protected]> Mon, 27 Sep 2010 08:35:16 -0700 (PDT)
Newsgroups gmane.comp.lang.tcl.starkit
Message-ID <ffa81cba-27a0-4b30-8094-66239474cc5c@e14g2000yqe.googlegroups.com>
> The mk4vfs layer stores files by zlib compressing them into a blob in
> the database. If the compressed size is the larger than the original
> size then it just stores the file. PNG files are likely to hit this.
> Then when reading the data, it looks for the zlib magic to enable
> decompression. I suspect that your PNG files have compressed segments
> and therefore trigger this. So we saved without compression but are
> decompressing on read. I think there are some variables to fiddle with
> in the mk4vfs stuff to disable the use of compression. If this turns
> out to be correct, you might want to hack the vfs to avoid this when
> the name matches *PNG.
>
> size is the original data size, csize is the size of the database blob.

For the files in question, vfs::mk4::open uses this piece of code to
open the channel:

		    set fd [mk::channel $sb(ino) contents r]

when csize and size are equal. Only when not equal, the decompress
code is used. I could verify no decompression is used for the file.

Jos.

-- 
You received this message because you are subscribed to the "starkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/starkit?hl=en