Dart.PowerTCP.Zip Namespace > Archive Class > QuickUnzip Method : QuickUnzip(Stream,String) Method |
<DescriptionAttribute("To load the source stream and decompress it")> Public Overloads Sub QuickUnzip( _ ByVal source As Stream, _ ByVal destination As String _ )
Dim instance As Archive Dim source As Stream Dim destination As String instance.QuickUnzip(source, destination)
[Description("To load the source stream and decompress it")] public void QuickUnzip( Stream source, string destination )
[Description("To load the source stream and decompress it")] public: void QuickUnzip( Stream* source, string* destination )
[Description("To load the source stream and decompress it")] public: void QuickUnzip( Stream^ source, String^ destination )
Exception | Description |
---|---|
ZipException | A critical zip operation error occurred during this activity. Please see ZipException.Message for details. |
This method is a quick and easy way to use the Archive component to decompress a compressed Stream to a specified destination directory in one step. It combines the two operations of Archive.Open and Archive.Unzip.
The Archive.PreservePath property determines whether to preserve the paths. The Archive.Overwrite property determines whether and how an existing file will be overwritten. By default, the paths will not be preserved and the overwrite choice is Overwrite.Never. The Archive.Password property is used for decrypting the encrypted items.
If an error occurs for an individual item during this operation, the Archive.Exception Event will be raised.
' Be sure to import the namespace by putting "Imports Dart.PowerTCP.Zip" ' at the top of your class. ' Preserve the path when unzipping Archive1.PreservePath = True ' Overwrite any existing files Archive1.Overwrite = Overwrite.Always ' Create a new stream with compressed data Dim stream = New System.IO.FileStream("c:\test.zip", System.IO.FileMode.Open) ' Unzip the data in the stream to c:\test Archive1.QuickUnzip(stream, "c:\Test")
// Be sure to import the namespace by putting "using Dart.PowerTCP.Zip;" // at the top of your class. // Preserve the path when unzipping archive1.PreservePath = true; // Overwrite any existing files archive1.Overwrite = Overwrite.Always; // Create a new stream with compressed data System.IO.FileStream stream = new System.IO.FileStream("c:\\test.zip", System.IO.FileMode.Open); // unzip the data in the stream to c:\test archive1.QuickUnzip(stream, "c:\\Test");