On 28 February 2011 08:49, Paolo Bonzini <[email protected]> wrote: > On 01/21/2011 08:27 PM, Reuben Thomas wrote: >> >> This is an interesting suggestion, not just because of performance >> reasons, but because I was trying to interface at the library level, >> while using a decompressor program directly would avoid having to do >> API impedance matching. > > Right, and it would also be strictly more powerful. For example, it could > allow grepping in binary files such as .odt or .doc. > > I'd base the choice of a filter strictly on the extension. Not using magic > numbers avoids the problem of buffering stdin.
But it doesn't work with pipes, which was much of the motivation for doing this in grep rather than in a revved-up zgrep wrapper. -- http://rrt.sc3d.org
