The CompressionLevel property controls the amount of compression to be applied by the library when compressing data. The greater the amount of compression applied, the greater the time it takes to perform the compression. Depending on the setting of the CompressionMethod property, the effects of the various possible settings of this property can vary. The CompressionLevel property affects the Zip and Convert methods only.
You can specify any value between 1 and 9, however it is recommended to use one of the following values:
Enum | Value | Meaning |
---|---|---|
xclNone | 0 | No compression. Files are stored in the zip file as raw data. |
xclLow | 1 | Minimum compression. This setting takes the least amount of time to compress data. For the Deflate compression method, when compared to the xclMedium setting, this setting usually gives noticeably faster compression times in exchange for about 1% to 15% larger compressed files. For the LZMA compression method, the dictionary size will be 64K. |
xclMedium | 6 | Normal compression. This is the best balance between the time it takes to compress data and the compression ratio achieved (this statement applies to both to the Deflate and the BWT compression methods). For the LZMA compression method, the dictionary size will be 32MB. |
xclHigh | 9 | Maximum compression. This setting achieves the best compression ratios that the compression algorithm is capable of producing. For the Deflate compression method, when compared to the xclMedium setting, this setting significantly increases compression time for only slightly smaller compressed files. We recommend that you use this setting only when you really need to achieve the smallest possible files and when compression time is totally unimportant. For the LZMA compression method, the dictionary size will be 64MB. |
xclMedium
Declaration (DLL API) | |
---|---|
|