Read Method (zipStream, options)

DotNetZip

Ionic Zip Library v1.9.1.6 Read Method (zipStream, options)
ReferenceIonic.ZipZipFileRead(Stream, ReadOptions)
Reads a zip file archive from the given stream using the specified options.
Declaration Syntax
C# Visual Basic Visual C++
public static ZipFile Read(
	Stream zipStream,
	ReadOptions options
)
Public Shared Function Read ( _
	zipStream As Stream, _
	options As ReadOptions _
) As ZipFile
public:
static ZipFile^ Read(
	Stream^ zipStream, 
	ReadOptions^ options
)
Parameters
zipStream (Stream)
the stream containing the zip data.
options (ReadOptions)
The set of options to use when reading the zip file.
Return Value
The ZipFile instance read from the stream.
Remarks

When reading from a file, it's probably easier to just use ZipFile.Read(String, ReadOptions). This overload is useful when when the zip archive content is available from an already-open stream. The stream must be open and readable and seekable when calling this method. The stream is left open when the reading is completed.

Reading of zip content begins at the current position in the stream. This means if you have a stream that concatenates regular data and zip data, if you position the open, readable stream at the start of the zip data, you will be able to read the zip archive using this constructor, or any of the ZipFile constructors that accept a Stream as input. Some examples of where this might be useful: the zip content is concatenated at the end of a regular EXE file, as some self-extracting archives do. (Note: SFX files produced by DotNetZip do not work this way; they can be read as normal ZIP files). Another example might be a stream being read from a database, where the zip content is embedded within an aggregate stream of data.

Exceptions
Exception Condition
Exception Thrown if the zip archive cannot be read.

Assembly: Ionic.Zip (Module: Ionic.Zip) Version: 1.9.1.8 (1.9.1.8)