title: Is there a version of tac that gunzips the content? (like zcat)
body: <p>I am working on a PHP script that needs to read log files in reverse line order.</p>
  
  <p>I currently do the following:</p>
  
  <pre><code>&lt;?php
  shell_exec("tac logfile.log &gt; tmpfile.log");
  $rFile = fopen("tmpfile.log", "r");
  while (!feof($rFile))
  {
      //logic 
  }
  unlink("tmpfile.log");
  ?&gt;
  </code></pre>
  
  <p>This works nicely as it switches the order of the lines in the file and I read from the temp file.</p>
  
  <p><strong>However</strong>, the log files are going to get massive and I need to keep a lengthy history, so I need to <strong>gzip</strong> the files up. I found out about 'zcat', and I was hoping that there would be 'ztac' which could plug straight into my code above... but I haven't managed to find it.</p>
  
  <p>Any ideas what the easiest/best way to do this is without needing lots of temp files and a big mess of server commands?</p>