> Maybe you could reimplement the Perl code trying to decompress always
> and trapping the exception when the file is not compressed? Something
> like this:
> 
> irb1.9 -rfacets/zlib -rzlib -rstringio
> irb(main):001:0> Zlib.decompress("plain text")
> Zlib::GzipFile::Error: not in gzip format

That is a good idea (I don't think you can rescue exceptions in Perl). 
However, I am still uncertain if wise/possible and how to get a single 
file handle on a stream from multiple files. I need to do 
zipping/unzipping on the fly since I want to work on huge files.



Martin
-- 
Posted via http://www.ruby-forum.com/.