title: Compress large log file before reading
body: <p>We have a large amount of logs (117 logs with total of about 17gb of data). It's straight text so I know it will compress well. I'm not looking for great compression, or speed (but that would be a good bonus). What I currently do is get a list of log files to read (they have a date stamp in the file name, so I filter on that first). After I get the list I then read each file using <code>File.ReadAllLines()</code> but we also filter on that...</p>
  
  <pre><code>private void GetBulkUpdateItems(List&lt;string&gt; allLines, Regex updatedRowsRegEx)
  {
      foreach (var file in this)
          allLines.AddRange(File.ReadAllLines(file).Where(x =&gt; updatedRowsRegEx.IsMatch(x)));
  
      allLines.Sort();
  }
  </code></pre>
  
  <p>reading 5 files from the network takes about 22 seconds. What I'd like to do is compress the list of files into a single zip file. copy the zip file locally, then unzip them and do the rest. Problem is I can't figure out how to start. Since I'm using .net 4.5 I first tried <code>System.IO.Compression.ZipFile</code> but it wants a Directory and I don't want all 117 files. I saw someone use a network stream and 7zip which sounded promising, and I'm fairly certain that 7zip is installed on the server I need the logs from (Probably not important because we use the UNC path). So I'm stuck. Any suggestions?</p>