read zipped txt data w/o unziping the txt file

May 13, 2011 at 6: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?

for

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

ChannelCount++;

}

}

 

Thanks!

Coordinator
May 19, 2011 at 7: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.

  http://cheeso.members.winisp.net/DotNetZipHelp/html/8e64cfe0-5dfc-2682-2c10-cb840ed3bfa1.htm