This project is read-only.

read zipped txt data w/o unziping the txt file

May 13, 2011 at 7:54 PM

is it possible to read data within a text file that is zipped without unzipping the file using dotnetzip?

for example, I can get the name of the file, but how to open it and read it w/o unzipping it?


each (ZipEntry ^e in zip)


if (e->FileName->EndsWith(".txt"))


ChannelNames[ChannelCount] = e->FileName;

// in here I need to read the data from the file






May 19, 2011 at 8:16 PM

I'm not clear on what you mean by "read it without unzipping it".  I think you mean "...without creating a filesystem file".

Yes, that is possible. You can extract to a stream, or you can open a readable stream for an entry.  See the documentation for the ZipEntry.Extract()  method that takes a Stream parameter.