PowerTCP Zip Compression for .NET
BeginUnzip(Stream,Object) Method
Example 




The destination stream for the decompressed data.
User state information.
Begins an asynchronous unzip operation.
Syntax
<DescriptionAttribute("To begin an asynchronous Unzip operation.")>
Public Overloads Function BeginUnzip( _
   ByVal destination As Stream, _
   ByVal state As Object _
) As IAsyncResult
Dim instance As ArchiveItem
Dim destination As Stream
Dim state As Object
Dim value As IAsyncResult
 
value = instance.BeginUnzip(destination, state)
[Description("To begin an asynchronous Unzip operation.")]
public IAsyncResult BeginUnzip( 
   Stream destination,
   object state
)
[Description("To begin an asynchronous Unzip operation.")]
public: IAsyncResult* BeginUnzip( 
   Stream* destination,
   Object* state
) 
[Description("To begin an asynchronous Unzip operation.")]
public:
IAsyncResult^ BeginUnzip( 
   Stream^ destination,
   Object^ state
) 

Parameters

destination
The destination stream for the decompressed data.
state
User state information.

Return Value

An IAsyncResult that identifies the asynchronous operation.
Exceptions
ExceptionDescription
ZipExceptionA critical zip operation error occurred during this activity. Please see ZipException.Message for details.
Remarks
An unzip operation on an ArchiveItem object will only decompress the item and not any other items in the collection.
Example
The following example demonstrates using QuickZip and specifying specific options. Only QuickZip is required in this operation.
' Be sure to import the namespace by putting "Imports Dart.PowerTCP.Zip"
' at the top of your class.

' Preserve the path structure of the files
Archive1.PreservePath = True
	
' Include any subdirectories
Archive1.IncludeSubs = True
	
' Specify compression level
Archive1.CompressionLevel = CompressionLevel.Medium

' Use the Deflate compression method
Archive1.DefaultCompressionMethod = CompressionMethod.Deflate

' Exclude any text files
Archive1.ExcludePattern = "*.txt"

' Set to use encryption
Archive1.DefaultEncryption = Encryption.Standard

' Specify the password
Archive1.Password = "testme"

' Perform the compression operation - this is the only required method for the operation
Archive1.QuickZip("c:\\Test\\*.*", "c:\\test.zip")
// Be sure to import the namespace by putting "using Dart.PowerTCP.Zip;"
// at the top of your class.

// Preserve the path structure of the files
archive1.PreservePath = true;

// Include any subdirectories
archive1.IncludeSubs = true;
			
// Specify compression level
archive1.CompressionLevel = CompressionLevel.Medium;
			
// Use the Deflate compression method
archive1.DefaultCompressionMethod = CompressionMethod.Deflate;
			
// Exclude any text files
archive1.ExcludePattern = "*.txt";
			
// Set to use encryption
archive1.DefaultEncryption = Encryption.Standard;

// Specify the password
archive1.Password = "testme";
			
// Perform the compression operation - this is the only required method for the operation
archive1.QuickZip("c:\\Test\\*.*", "c:\\test.zip");
See Also

Reference

ArchiveItem Class
ArchiveItem Members
Overload List


PowerTCP Zip for .NET Documentation Version 2.1.1
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic