Reuben Thomas wrote:
My patch to add transparent decompression, as per the TODO list, at:
https://savannah.gnu.org/patch/?6107
builds correctly against current CVS. Could someone review it? (Tony,
you encouraged me to work on my patches six weeks ago, and then I think
we were side-tracked by discussion of the build system). I'm keen to get
this patch and a similar one to allow dynamic loading of PCRE into grep.
Note that the above patch is for code only; I'll write a documentation
patch as soon as it's accepted. See the tracker for details, but
basically this patch adds an --uncompress switch which uses libz to do
transparent decompression.
Thanks Reuben for the patch. I took a quick look and I have a few comments:
* The patch statically links with libz at compile time. If grep is
installed before libz, then it would need to be recompiled. Ideally, the
user should have an option of forcing static linking, use dynamic
linking, or totally disabling the option. How complicated is it to get
that working?
I remember there was a patch that tried to do this for -P, but I
couldn't locate it. Need to dig deeper.
* In addition to documentation, I'd like to see some test cases. And the
more the better :O)
* My understanding is that zlib support .gz files. Any plans to
integrate libbzip2 as well?
And a question to the community: is --uncompress a good option name? Any
objections? Zlib uses the term 'decompress'.
Cheers,
TAA
--
Tony Abou-Assaleh
Email: [EMAIL PROTECTED]
Web site: http://tony.abou-assaleh.net