GNU bug report logs - #51921
Anything like ztail

Previous Next

Package: gzip;

Reported by: Peng Yu <pengyu.ut <at> gmail.com>

Date: Wed, 17 Nov 2021 13:09:01 UTC

Severity: wishlist

To reply to this bug, email your comments to 51921 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gzip <at> gnu.org:
bug#51921; Package gzip. (Wed, 17 Nov 2021 13:09:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Peng Yu <pengyu.ut <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gzip <at> gnu.org. (Wed, 17 Nov 2021 13:09:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Peng Yu <pengyu.ut <at> gmail.com>
To: bug-gzip <at> gnu.org
Subject: Anything like ztail
Date: Wed, 17 Nov 2021 07:08:48 -0600
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




Information forwarded to bug-gzip <at> gnu.org:
bug#51921; Package gzip. (Wed, 17 Nov 2021 20:34:02 GMT) Full text and rfc822 format available.

Message #8 received at 51921 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Peng Yu <pengyu.ut <at> gmail.com>
Cc: 51921 <at> debbugs.gnu.org
Subject: Re: bug#51921: Anything like ztail
Date: Wed, 17 Nov 2021 12:33:33 -0800
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).




Severity set to 'wishlist' from 'normal' Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Wed, 17 Nov 2021 20:34:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gzip <at> gnu.org:
bug#51921; Package gzip. (Wed, 17 Nov 2021 21:59:02 GMT) Full text and rfc822 format available.

Message #13 received at 51921 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Kitt <steve <at> sk2.org>
To: Peng Yu <pengyu.ut <at> gmail.com>
Cc: Paul Eggert <eggert <at> cs.ucla.edu>, 51921 <at> debbugs.gnu.org
Subject: Re: bug#51921: Anything like ztail
Date: Wed, 17 Nov 2021 22:58:14 +0100
[Message part 1 (text/plain, inline)]
On Wed, 17 Nov 2021 12:33:33 -0800, Paul Eggert <eggert <at> cs.ucla.edu> wrote:
> 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).

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’s actually useful will depend on the scenario.

Regards,

Stephen
[Message part 2 (application/pgp-signature, inline)]

This bug report was last modified 3 years and 212 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.