From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 17 08:09:00 2021 Received: (at submit) by debbugs.gnu.org; 17 Nov 2021 13:09:00 +0000 Received: from localhost ([127.0.0.1]:60418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mnKgM-0008Tx-Sq for submit@debbugs.gnu.org; Wed, 17 Nov 2021 08:09:00 -0500 Received: from lists.gnu.org ([209.51.188.17]:60260) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mnKgH-0008Ti-In for submit@debbugs.gnu.org; Wed, 17 Nov 2021 08:08:57 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59128) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mnKgH-00062r-E6 for bug-gzip@gnu.org; Wed, 17 Nov 2021 08:08:53 -0500 Received: from [2a00:1450:4864:20::131] (port=40808 helo=mail-lf1-x131.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mnKgG-0000xd-4a for bug-gzip@gnu.org; Wed, 17 Nov 2021 08:08:53 -0500 Received: by mail-lf1-x131.google.com with SMTP id l22so8166845lfg.7 for ; Wed, 17 Nov 2021 05:08:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=P8fIiGUxTFWFTGKD84QQzK09BcRMpCm49zUPFr/vd+E=; b=a4XLRyfa9ggdIJdIPX9hv0OuRRZWAPLGWPeIIAzkUtKMBbADVvMYMJZi0RcBpGujDY kyD1b7RuQJZMgAVFeSwNGqRAR7gptxrzBwmpHd0lSnF6htmyPx39cH2Bcmz3nGGcFJzf 4nvjw5DHBicbcHeXHTcCGPFQzbr4DeVgqFZZ8vjdSKMJ6beyzzbyxpcg8Pli/KGGf2Bh dW4kswqbY+tMQkPfvMqzCnTZqsujSuGJMyeXfLidsku4NH/4X7WN13EmpBVJA5kdrY0C zg3nY+Dl5vuHuxKdJJK/ntKeSbQXv/8DqL8Kqx7k/liQIJPzDvcaC2YNoLBtBDnr15RY tvIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=P8fIiGUxTFWFTGKD84QQzK09BcRMpCm49zUPFr/vd+E=; b=Rr8NG7zTGYo5WAJm/AQy49qxqHw+cEC2lNR+Qw2ov51Zm4DEIDrU1ZjzwzRN/UvDEM 6V/yRNBGLFPwOnPkQwN/NssivI2XTZfYd5Y0Ww0YxTGSTQIMRhPABZXM9Nx3JUAWyro2 P4SOV5p4dwJJ5wFro6i/CiLDPZ0dowIqMETMJdapA5OEBahNgGbYEMtA6IWL9EoeVkeY AvXvlVVBEwl9YtFdw5ZIbWrrilajqfC4p8LvR2nBjT+KI008eNghETLLpP2I11gkHtwQ M8+sLqwqf6hXHh6nPW0MxniBrjCnMX57T+pWKtOLqkMsfFfdPISpsCsEq3EiOmo/8GF2 MiuA== X-Gm-Message-State: AOAM533BzooAAYj8oNQWGZZTQMl49IpseBn8H7Y8abH/ova2cQPu/Cir +QgP0NRYQ6N4ZUa6DdLxQVbuZiws5j8P+ZfrHhFGBJl/ X-Google-Smtp-Source: ABdhPJxlgHIf7gSgW5mbKMIluD0nlh/kHOoaVcpCkck1zuWs2GKNozoHgI0bY55AVgrFEN2Q6pldFTNzPth7uTTWxOQ= X-Received: by 2002:a05:6512:3d90:: with SMTP id k16mr15194400lfv.361.1637154529374; Wed, 17 Nov 2021 05:08:49 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a2e:9dc9:0:0:0:0:0 with HTTP; Wed, 17 Nov 2021 05:08:48 -0800 (PST) From: Peng Yu Date: Wed, 17 Nov 2021 07:08:48 -0600 Message-ID: Subject: Anything like ztail To: bug-gzip@gnu.org Content-Type: text/plain; charset="UTF-8" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::131 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=pengyu.ut@gmail.com; helo=mail-lf1-x131.google.com X-Spam_score_int: 14 X-Spam_score: 1.4 X-Spam_bar: + X-Spam_report: (1.4 / 5.0 requ) BAYES_50=0.8, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi, Is there a more efficient way to perform ztail. I could use 'zcat f.gz | tail'. But this means that it needs to go through the file until the end. It would be more efficient to just check the end (as `tail f.txt` does it). Is there a way to make ztail more efficient? -- Regards, Peng From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 17 15:33:44 2021 Received: (at 51921) by debbugs.gnu.org; 17 Nov 2021 20:33:44 +0000 Received: from localhost ([127.0.0.1]:34005 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mnRcl-0005gw-Qx for submit@debbugs.gnu.org; Wed, 17 Nov 2021 15:33:44 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:45418) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mnRci-0005gN-7r for 51921@debbugs.gnu.org; Wed, 17 Nov 2021 15:33:41 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E57551600C5; Wed, 17 Nov 2021 12:33:34 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 1q-u3wib2L_q; Wed, 17 Nov 2021 12:33:34 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 197A51600D1; Wed, 17 Nov 2021 12:33:34 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id pIQR4dRPxqft; Wed, 17 Nov 2021 12:33:34 -0800 (PST) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id E61731600C5; Wed, 17 Nov 2021 12:33:33 -0800 (PST) Message-ID: <8161763d-d454-8217-0617-4b7e0af20caf@cs.ucla.edu> Date: Wed, 17 Nov 2021 12:33:33 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Subject: Re: bug#51921: Anything like ztail Content-Language: en-US To: Peng Yu References: From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 51921 Cc: 51921@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.4 (---) On 11/17/21 05:08, Peng Yu wrote: > Is there a way to make ztail more efficient? Not in general, no. The compressed file can't be decompressed from random locations. There might be some options for doing what you're suggesting if --rsyncable is used during compression (which it usually isn't) and if someone would like to code up something for gzip (which would be nontrivial). From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 17 15:33:41 2021 Received: (at control) by debbugs.gnu.org; 17 Nov 2021 20:33:42 +0000 Received: from localhost ([127.0.0.1]:34003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mnRcj-0005ge-Jy for submit@debbugs.gnu.org; Wed, 17 Nov 2021 15:33:41 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:45382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mnRcf-0005gH-L2 for control@debbugs.gnu.org; Wed, 17 Nov 2021 15:33:40 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 6CBAA1600AD for ; Wed, 17 Nov 2021 12:33:31 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id KaCC1SnF8-lW for ; Wed, 17 Nov 2021 12:33:30 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D16991600C5 for ; Wed, 17 Nov 2021 12:33:30 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 281vh6FZTnxD for ; Wed, 17 Nov 2021 12:33:30 -0800 (PST) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id B00761600AD for ; Wed, 17 Nov 2021 12:33:30 -0800 (PST) Message-ID: Date: Wed, 17 Nov 2021 12:33:30 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Content-Language: en-US To: control@debbugs.gnu.org From: Paul Eggert Subject: 51921 is wishlist Organization: UCLA Computer Science Department Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) severity 51921 wishlist From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 17 16:58:30 2021 Received: (at 51921) by debbugs.gnu.org; 17 Nov 2021 21:58:30 +0000 Received: from localhost ([127.0.0.1]:34087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mnSwo-0002H7-Dt for submit@debbugs.gnu.org; Wed, 17 Nov 2021 16:58:30 -0500 Received: from 8.mo583.mail-out.ovh.net ([178.32.116.78]:36283) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mnSwl-0002Gv-Ti for 51921@debbugs.gnu.org; Wed, 17 Nov 2021 16:58:29 -0500 Received: from player158.ha.ovh.net (unknown [10.110.171.49]) by mo583.mail-out.ovh.net (Postfix) with ESMTP id 368B222E57 for <51921@debbugs.gnu.org>; Wed, 17 Nov 2021 21:58:26 +0000 (UTC) Received: from sk2.org (82-65-25-201.subs.proxad.net [82.65.25.201]) (Authenticated sender: steve@sk2.org) by player158.ha.ovh.net (Postfix) with ESMTPSA id 50CC8245C98DE; Wed, 17 Nov 2021 21:58:22 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-95G001f12ce4a1-4a0b-4627-ac51-28df6b2c428b, F9C00B7AC4BCC787646F4FCE126C86F5C5A2FE5B) smtp.auth=steve@sk2.org X-OVh-ClientIp: 82.65.25.201 Date: Wed, 17 Nov 2021 22:58:14 +0100 From: Stephen Kitt To: Peng Yu Subject: Re: bug#51921: Anything like ztail Message-ID: <20211117225814.587c4220@heffalump.sk2.org> In-Reply-To: <8161763d-d454-8217-0617-4b7e0af20caf@cs.ucla.edu> References: <8161763d-d454-8217-0617-4b7e0af20caf@cs.ucla.edu> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/nc=C8tTdUk+YY_2_+aNvtl5"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Ovh-Tracer-Id: 8863365544658110086 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvuddrfeeggddugeelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepfffhvffukfgjfhfogggtsehgtderreertdejnecuhfhrohhmpefuthgvphhhvghnucfmihhtthcuoehsthgvvhgvsehskhdvrdhorhhgqeenucggtffrrghtthgvrhhnpefhledujefhveelfffgledvhfdvveektdfgjeevleeuteffkeehvdeiudeuuddvueenucffohhmrghinhepghhithhhuhgsrdgtohhmnecukfhppedtrddtrddtrddtpdekvddrieehrddvhedrvddtudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhhtpdhhvghlohepphhlrgihvghrudehkedrhhgrrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpehsthgvvhgvsehskhdvrdhorhhgpdhrtghpthhtohepheduledvudesuggvsggsuhhgshdrghhnuhdrohhrgh X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 51921 Cc: Paul Eggert , 51921@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --Sig_/nc=C8tTdUk+YY_2_+aNvtl5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, 17 Nov 2021 12:33:33 -0800, Paul Eggert wrote: > On 11/17/21 05:08, Peng Yu wrote: > > Is there a way to make ztail more efficient? =20 >=20 > Not in general, no. The compressed file can't be decompressed from=20 > random locations. >=20 > There might be some options for doing what you're suggesting if=20 > --rsyncable is used during compression (which it usually isn't) and if=20 > someone would like to code up something for gzip (which would be=20 > nontrivial). gztool (https://github.com/circulosmeos/gztool) can be used to create additional indexes and then use that to access a compressed file randomly without decompressing everything; it supports tail-style operation as well. Whether it=E2=80=99s actually useful will depend on the scenario. Regards, Stephen --Sig_/nc=C8tTdUk+YY_2_+aNvtl5 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEnPVX/hPLkMoq7x0ggNMC9Yhtg5wFAmGVevcACgkQgNMC9Yht g5yT4g/+L4U4QJjlnFlVGLSXrSKvnhA7GDCbjhJ+kRQSkIxx0mnxiDBQvrDu57YV 7UUzvmxuKm9qkSft30J/xHpHlzy+iIUvzNLo3wLnxJSC9AeOEOI3oq5grsb6T9nX yioudOLwFpU11NrlI773yb1WowdogCuPyRLGt2oMlrQtiiR1lJ23iFf+i0Op3BkO eE3IzMyrZdEBg1jZkraggwkoVRWCRrKSRDstmd2+vdo0gXQhA0rUkEaB5+qiSd1N 6uzE7L2vSDX6+qtNwos8kHSlHKdKHOVB3DfF8yLjkrwX2TWUK96C/XitFioLY15V i9HnGofWB6TVcQhfMWum5jnPPfhetpL68xGaQbGV/Cgj9WhWBHH14XtjeOga57E3 cfRupmatSHv4atMIyG8YbMKrSuldWHXCv6G09EwtpVVjH+uaahj5JdL8qF4G11Wn 9ZFwqkJI/bpJOqqKpydAiOdb9oXJ2xtb5jl3zgGy8BxWZ2kfjzYLlYKdI7n5lK9f YPiVUAn09t8i/9iC8abitduYR5OHTk5Y/OaULLAUBG2ONnb0AR0+p4yn2Z1w5AuL WaFgam6TiPhKWTJPyREf5HDIAKjaXK6nBl97BXC1IAzEuPZ114McVCTkQd2lVn8M Ztjni5O+fIc5kP90lZUj2f64rZ83Q3lHZtRjgVMcrAeSR8EVT8M= =/Ojz -----END PGP SIGNATURE----- --Sig_/nc=C8tTdUk+YY_2_+aNvtl5--