/** * Reads all the entries from the ZipInputStream * into memory, and closes the source stream. * We'll then eat lots of memory, but be able to * work with the entries at-will. */ public ZipInputStreamZipEntrySource(ZipInputStream inp){ zipEntries = new List<FakeZipEntry>(); bool going = true; while(going) { ZipEntry zipEntry = inp.GetNextEntry(); if(zipEntry == null) { going = false; } else { FakeZipEntry entry = new FakeZipEntry(zipEntry, inp); //inp.Close(); zipEntries.Add(entry); } } inp.Close(); }
/** * Reads all the entries from the ZipInputStream * into memory, and closes the source stream. * We'll then eat lots of memory, but be able to * work with the entries at-will. */ public ZipInputStreamZipEntrySource(ZipInputStream inp) { zipEntries = new List <FakeZipEntry>(); bool going = true; while (going) { ZipEntry zipEntry = inp.GetNextEntry(); if (zipEntry == null) { going = false; } else { FakeZipEntry entry = new FakeZipEntry(zipEntry, inp); //inp.Close(); zipEntries.Add(entry); } } inp.Close(); }
public Stream GetInputStream(ZipEntry zipEntry) { FakeZipEntry entry = (FakeZipEntry)zipEntry; return(entry.GetInputStream()); }