Unpack Method (stream, path)

Microsoft Deployment Compression & Installer

Copy image CopyHover image
Deployment Tools Foundation Unpack Method (stream, path)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.CompressionCompressionEngineUnpack(Stream, String)
Reads a single file from an archive stream.
Declaration Syntax
C# Visual Basic Visual C++
public Stream Unpack(
	Stream stream,
	string path
)
Public Function Unpack ( 
	stream As Stream,
	path As String
) As Stream
public:
Stream^ Unpack(
	Stream^ stream, 
	String^ path
)
Parameters
stream (Stream)
A stream for reading the archive.
path (String)
The path of the file within the archive (not the external file path).
Return Value
Stream
A stream for reading the extracted file, or null if the file does not exist in the archive.
Remarks
The entire extracted file is cached in memory, so this method requires enough free memory to hold the file.
Exceptions
Exception Condition
ArchiveException The stream is not a valid archive.

Assembly: Microsoft.Deployment.Compression (Module: Microsoft.Deployment.Compression.dll) Version: 3.0.0.0 (3.9.1006.0)