in reply to Using File::ReadBackwards with Compressed Files
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.
|
|---|