ICSharpCode.SharpZipLib.Zip.ZipFile.ZipFile C# (CSharp) Method

ZipFile() public method

Opens a Zip file reading the given Stream.
/// An i/o error occurs /// /// The stream doesn't contain a valid zip archive.
/// /// The stream doesnt support seeking. /// /// The stream argument is null. ///
public ZipFile ( Stream stream ) : System
stream Stream The to read archive data from.
return System
        public ZipFile(Stream stream) {
            if (stream==null) {
                throw new ArgumentNullException("stream");
            }

            if (!stream.CanSeek) {
                throw new ArgumentException("Stream is not seekable", "stream");
            }

            baseStream_=stream;
            isStreamOwner=true;

            if (baseStream_.Length>0) {
                try {
                    ReadEntries();
                } catch {
                    DisposeInternal(true);
                    throw;
                }
            } else {
                entries_=new ZipEntry[0];
                isNewArchive_=true;
            }
        }

Same methods

ZipFile::ZipFile ( ) : System
ZipFile::ZipFile ( FileStream file ) : System
ZipFile::ZipFile ( string name ) : System