To read a zipped file using a StreamReader, add the following code.
Make sure to add these Imports (Visual Basic)/using (C#) statements at the top of the code:
Imports C1.C1Zip and Imports System.IO
using C1.C1Zip; and using System.IO;
' Open a zip file.
Dim zip As New C1ZipFile()
zip.Open("c:\temp\myzipfile.zip")
' Open an input stream on any entry.
Dim ze As C1ZipEntry = zip.Entries("someFile.cs")
Dim s As Stream = ze.OpenReader()
' Open the StreamReader on the stream.
Dim sr As New StreamReader(s)
' Use the StreamReader, then close it.
•C#
// Open a zip file.
C1ZipFile zip = new C1ZipFile();
zip.Open(@"c:\temp\myzipfile.zip");
// Open an input stream on any entry.
C1ZipEntry ze = zip.Entries["someFile.cs"];
Stream s = ze.OpenReader();
// Open the StreamReader on the stream.
StreamReader sr = new StreamReader(s);
// Use the StreamReader, then close it.