Date: Tue, 30 Aug 2011 01:16:39 +0200 From: Gabor Kovesdan <gabor@FreeBSD.org> To: Ben Kaduk <minimarmot@gmail.com> Cc: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r225251 - user/gabor/grep/trunk Message-ID: <4E5C1DD7.70200@FreeBSD.org> In-Reply-To: <CAK2BMK5ZEsZAwowQ4OvR%2BRZ6bPqaiL625kMR7=%2Bm%2B%2BMOdh9pwg@mail.gmail.com> References: <201108292036.p7TKaLgL011686@svn.freebsd.org> <CAK2BMK5ZEsZAwowQ4OvR%2BRZ6bPqaiL625kMR7=%2Bm%2B%2BMOdh9pwg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2011.08.30. 0:59, Ben Kaduk wrote: > On 8/29/11, Gabor Kovesdan<gabor@freebsd.org> wrote: >> Author: gabor >> Date: Mon Aug 29 20:36:21 2011 >> New Revision: 225251 >> URL: http://svn.freebsd.org/changeset/base/225251 >> >> Log: >> - Add support for xz[ef]?grep (1) and lz[ef]?grep. The former handles >> xz(1) >> compressed files and the latter lzma(1) compressed files. The -X and -M >> command-line options can also be used respectively. >> > Is there a reason to not make just a single zgrep(1) binary that can > tell what compression algorithm is in use and choose it as > appropriate? It seems like that would be more convenient from a > user's perspective. 1, From xz(1) code it seems that there is no clean way of auto-detection between xz/lzma. I do not know about the rest because I haven't checked it. It may requie some preprocessing, which makes the code more complex or we could use libarchive but probably it has some overhead and performance is crucial in grep so I want to keep I/O as simple as possible. 2, bzgrep imho is kind of a de facto standard because of GNU despite not being part of POSIX so I prefer not to drop it. Similarly, xzgrep is part of XZ utils. In the case of lzgrep, yes, that's my invention to follow the convention. Gabor
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E5C1DD7.70200>