how to not extract paths from zip

Oct 19, 2008 at 1:31 PM

Is there anyway to extract files from a zip, not using the path stored in the zip?  i.e. I do not want to recreate the folder structure inside the zip, just output all files to one folder instead.
Oct 20, 2008 at 5:49 PM
Extract to a file stream, opened on the file you desire, with the ZipEntry.Extract(System.IO.Stream) method.

Something like this:

ZipEntry e = zip[filename];
using (System.IO.FileStream s = new System.IO.FileStream(System.IO.Path.GetFileName(e.FileName), IO.FileMode.Open, IO.FileAccess.ReadWrite))