CompressionLevel Property

DotNetZip

Ionic Zip Library v1.9.1.6 CompressionLevel Property
ReferenceIonic.ZipZipFileCompressionLevel
Sets the compression level to be used for entries subsequently added to the zip archive.
Declaration Syntax
C# Visual Basic Visual C++
public CompressionLevel CompressionLevel { get; set; }
Public Property CompressionLevel As CompressionLevel
	Get
	Set
public:
property CompressionLevel CompressionLevel {
	CompressionLevel get ();
	void set (CompressionLevel value);
}
Remarks

Varying the compression level used on entries can affect the size-vs-speed tradeoff when compression and decompressing data streams or files.

As with some other properties on the ZipFile class, like Password, Encryption, and ZipErrorAction, setting this property on a ZipFile instance will cause the specified CompressionLevel to be used on all ZipEntry items that are subsequently added to the ZipFile instance. If you set this property after you have added items to the ZipFile, but before you have called Save(), those items will not use the specified compression level.

If you do not set this property, the default compression level is used, which normally gives a good balance of compression efficiency and compression speed. In some tests, using BestCompression can double the time it takes to compress, while delivering just a small increase in compression efficiency. This behavior will vary with the type of data you compress. If you are in doubt, just leave this setting alone, and accept the default.

Assembly: Ionic.Zip (Module: Ionic.Zip) Version: 1.9.1.8 (1.9.1.8)