On Thu, Jan 24, 2002 at 11:07:46AM +0300, Alexander V. Lukyanov wrote:
> > I'm thinking of something like an OutputFilter derivation to do just
> > for_each handling.
>
> Maybe for_each could be avoided at all if lftp would be linked with libz
> and libbz2.
It could also simply be removed. Both gzip and bzip2 permit concatenating
files. (In other words, remove for_each and make zcat and bz2cat regular
filters.)
The obvious loss is that it stops at the first corruption. For zcat,
this doesn't seem like a problem: regular zcat does the same thing.
("zcat file1.gz file2.gz" stops if file1.gz is truncated, without opening
file2.gz at all.)
The only other difference is for zmore/zless--they *do* use a separate zcat
for each file, and so recover from this.
I'm still (passively) investigating other ways to do this. (gzip
handles other formats--you can zcat a .zip that has only file in it, for
example--so importing it is far too much code and maintenance.)
Are there any other reasons for for_each'ing this?
--
Glenn Maynard