Creates the compressed archive.
public void Compress();
Public Sub Compress()
Invoking Compress creates the archive specified by ArchiveFile. When the method is called, all files specified by the DecompressedName field of the Files collection will be compressed and written to ArchiveFile.
The compressed data may be streamed out by setting WriteToProgressEvent to true. If streaming is enabled the compressed data will also be provided via the Progress event. If ArchiveFile is set to an empty string the archive will be written only to this event.
The files to compress are specified in the Files collection. The file names are specified by CompressedName and DecompressedName. These should be specified before invoking Compress, either manually or by invoking IncludeFiles.
Example (Creating an Archive)
ZipControl.ArchiveFile = "c:\test.zip" ZipControl.RecurseSubdirectories = true ZipControl.IncludeFiles("c:\foo\*") ZipControl.Compress()
.NET Standard Notes
To call this method in an asynchronous manner call CompressAsync instead. When the method completes (or an error is encountered) the CompressCompleted event will fire.