bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch for transparent decompression


From: Reuben Thomas
Subject: Re: Patch for transparent decompression
Date: Sun, 27 Apr 2008 22:29:52 +0100 (BST)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

On Sun, 27 Apr 2008, Tony Abou-Assaleh wrote:

* 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?

Not too hard.

I remember there was a patch that tried to do this for -P, but I couldn't locate it. Need to dig deeper.

That was mine too, I didn't submit it yet to the tracker because I was trying to get this one accepted first. I shall instead update the transparent decompression patch to use the same dynamic linking techniques.

* In addition to documentation, I'd like to see some test cases. And the more the better :O)

I'm not good at thinking of these; I'd be happy for any hints.

* My understanding is that zlib support .gz files. Any plans to integrate libbzip2 as well?

This is a nasty one. I see three options:

1. [Easiest for grep] Add code to grep to determine what sort of compression we're looking at. Currently we don't have to do this.

2. [A bit cleaner, a bit slower] Write a little library that decides whether to delegate to libbzip2 or libz for a given stream.

3. [Nicest solution, slowest and most difficult to get accepted] Patch libz so that it can delegate to libbzip2 for bzipped files (or vice versa), and just use the one interface.

And a question to the community: is --uncompress a good option name? Any objections? Zlib uses the term 'decompress'.

I'd be happy to change; I think "decompress" is actually better.

--
http://rrt.sc3d.org/
sane, a.  having tragedy in the heart and comedy in the head (Chesterton)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]