From owner-svn-src-user@FreeBSD.ORG Mon Aug 29 23:16:49 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9851D106564A; Mon, 29 Aug 2011 23:16:49 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id 4F1878FC14; Mon, 29 Aug 2011 23:16:49 +0000 (UTC) Received: from server.mypc.hu (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id 7DBA514E5E6A; Tue, 30 Aug 2011 01:16:48 +0200 (CEST) X-Virus-Scanned: amavisd-new at server.mypc.hu Received: from server.mypc.hu ([127.0.0.1]) by server.mypc.hu (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id qbkYUp1-BFdh; Tue, 30 Aug 2011 01:16:45 +0200 (CEST) Received: from [192.168.1.106] (catv-80-98-232-12.catv.broadband.hu [80.98.232.12]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id 6A60114E5E3D; Tue, 30 Aug 2011 01:16:45 +0200 (CEST) Message-ID: <4E5C1DD7.70200@FreeBSD.org> Date: Tue, 30 Aug 2011 01:16:39 +0200 From: Gabor Kovesdan User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0a1) Gecko/20110816 Thunderbird/8.0a1 MIME-Version: 1.0 To: Ben Kaduk References: <201108292036.p7TKaLgL011686@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r225251 - user/gabor/grep/trunk X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2011 23:16:49 -0000 On 2011.08.30. 0:59, Ben Kaduk wrote: > On 8/29/11, Gabor Kovesdan 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