I'm afraid you can't do that, Dave. (Sorry, 2001 flashback :-)

An uncompressed logfile will make sense wherever you start to read it, as long as it is at the beginning of a line. However, a compressed file needs to be read from the start. In particular, modern compression alghorhythms change their coding tables as they move through the data they compress. That means you can't make sense of what came later, unless you know what came before.

Even if you found a binary of a zReadBackwardCat it would still have to decompress/read through the whole file in order to understand the end.

Some of the latest compression methods (bzip2?) have resync points scattered through the file, and you might be able to use those to mitigate the worst of it. But I think it would be a lot of work, and it would only work for that particular compression method.


In reply to Re: Using File::ReadBackwards with Compressed Files by matija
in thread Using File::ReadBackwards with Compressed Files by Dru

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.