![Copy image Copy image](copycode.gif)
![CopyHover image CopyHover image](copycodeHighlight.gif)
Deployment Tools Foundation
Unpack Method (stream, path)
Deployment Tools Foundation Namespaces ► Microsoft.Deployment.Compression ► CompressionEngine ► Unpack(Stream, String)
Reads a single file from an archive stream.
![](collapse_all.gif)
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 )
![](collapse_all.gif)
Stream
A stream for reading the extracted file, or null if the file does not exist in the archive.
A stream for reading the extracted file, or null if the file does not exist in the archive.
![](collapse_all.gif)
The entire extracted file is cached in memory, so this
method requires enough free memory to hold the file.
![](collapse_all.gif)
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)