From: Robert Dober Date: 2007-04-24T20:44:45+09:00 Subject: Re: unix zcat with ruby? On 4/24/07, Brian Candler wrote: > On Tue, Apr 24, 2007 at 07:52:41PM +0900, Robert Dober wrote: > > >of course but this behavior surprises me a little bit, > > forget what I said, I just switched my brain on > > the concatenation of two gzipped streams is of course not a gzipped stream, > > But the standalone gzip program handles this: zcat does too, which is nice of course. But this is an extra feature and I did not want to criticize zlib for not implementing this extra feature, maybe someone will provide a patch to ruby-core ;) > > $ (echo "foo" | gzip -c; echo "bar" | gzip -c) | gzip -dc > foo > bar > $ > > It enables you to grow a gzip file without having to entirely decompress and > recompress what's already there. Yeah I just tested this, as I use gzip only with tar. Hmm does that mean that I was wrong that the concatenation of two gzipped streams is not a gzipped stream? Nahh, that surely is just an underlying feature of gzip (and bzip2 for that matter). Gotta look that after... > > Cheers Robert -- You see things; and you say Why? But I dream things that never were; and I say Why not? -- George Bernard Shaw