<p>I'm trying to use SharpZipLib to pull specified files from a zip archive. All of the examples I've seen always expect that you want to unzip the entire zip, and do something along the lines of:</p>

<pre><code>       FileStream fileStreamIn = new FileStream (sourcePath, FileMode.Open, FileAccess.Read);

        ZipInputStream zipInStream = new ZipInputStream(fileStreamIn);
        ZipEntry entry;

        while (entry = zipInStream.GetNextEntry() != null)
        {
            // Unzip file
        }
</code></pre>

<p>What I want to do is something like:</p>

<pre><code>ZipEntry entry = zipInStream.SeekToFile("FileName");
</code></pre>

<p>As my needs involve using a zip as a package and only grabbing files into memory as needed.</p>

<p>Is anyone familiar with SharpZipLib? Does anyone know if I can do this without running through the entire zip by hand?</p>

ZipFile.GetEntry should do the trick:
```
```
using (var fs = new FileStream(sourcePath, FileMode.Open, FileAccess.Read))
using (var zf = new ZipFile(fs)) {
   var ze = zf.GetEntry(fileName);
   if (ze == null) {
      throw new ArgumentException(fileName, "not found in Zip");
   }

   using (var s = zf.GetInputStream(ze)) {
      // do something with ZipInputStream
   }
}
```
```