ComHelper.OpenGzip

OpenGzip(Stream)

Allows a COM application to load a gzip archive from a stream.

public GzipArchive OpenGzip(Stream stream)
ParameterTypeDescription
streamStreamA .NET stream object that contains the archive to load.

Return Value

A GzipArchive object that represents the archive.

Exceptions

exceptioncondition
EndOfStreamExceptionThrown when the end of the stream is reached before the expected number of bytes are read.
ArgumentNullExceptionThrown when an stream is null.
InvalidDataExceptionThrown when the data is invalid or corrupted.

See Also


OpenGzip(string)

Allows a COM application to load a gzip archive from a file.

public GzipArchive OpenGzip(string fileName)
ParameterTypeDescription
fileNameStringFilename of the archive to load.

Return Value

A GzipArchive object that represents the archive.

Exceptions

exceptioncondition
EndOfStreamExceptionThrown when the end of the stream is reached before the expected number of bytes are read.
ArgumentExceptionThe file name is empty, contains only white spaces, or contains invalid characters.
ArgumentNullExceptionfileName is null.
DirectoryNotFoundExceptionThe specified path is invalid, such as being on an unmapped drive.
FileNotFoundExceptionThe file is not found.
InvalidDataExceptionThrown when the data is invalid or corrupted.
PathTooLongExceptionThe specified path, file name, or both exceed the system-defined maximum length.
UnauthorizedAccessExceptionAccess to fileName is denied.

See Also