Gets or sets the compression level to be used by Add(String) and AddFile(String) methods.
Possible values are 0-9, where 0 means no compression (fastest) and 9 means best compression (slowest).
6 (medium compression and speed) is a default value.
Namespace:
Rebex.IO.Compression
Assembly:
Rebex.Zip (in Rebex.Zip.dll)
Syntax
Visual Basic |
---|
Public Property CompressionLevel As Integer Get Set |
C# |
---|
public int CompressionLevel { get; set; } |
Field Value
Compression level (0-9), where 0 means no compression (fastest) and 9 means best compression (slowest). 6 (medium compression and speed) is a default value.Remarks
0 means no compression;
1 is the fastest compression (but the worst compression ratio);
9 is the slowest compression (but the best compression ratio).
Exceptions
Exception | Condition |
---|---|
System..::..ArgumentOutOfRangeException | The value is out of range of valid values (0-9). |