helper methods for reading files directly

Apr 15, 2011 at 12:11 AM

Really like this project, but would like to see some methods to help with manipulating individual files inside the zip, in-memory... ie, an easier way (or at lease some examples) for how to open a filestream on an individual file to allow reading it's content. Writing might be useful as well but I haven't personally needed that yet.

Right now, im iterating through the files, unapcking to the temp dir, opening to read and gather info, then deleting the temp file. Seems more efficient to just read it in place and eliminate the extra io.

 

Coordinator
Apr 15, 2011 at 11:44 PM
Edited Apr 15, 2011 at 11:45 PM

ZipEntry.OpenReader() will get you a readable stream for the uncompressed (and maybe decrypted if necessary) content for a single ZipEntry.

http://cheeso.members.winisp.net/DotNetZipHelp/html/ea82f312-372e-edad-d374-8db2486e70ba.htm

The reference doc page includes example code .