[Setup]: Compression

Inno Setup

[Setup]: Compression

Valid values:

zip zip/1 through zip/9
bzip
bzip/1 through bzip/9
lzma
lzma/fast
lzma/normal
lzma/max
lzma/ultra   (review memory requirements below before using)
lzma/ultra64   (review memory requirements below before using)
lzma2
lzma2/fast
lzma2/normal
lzma2/max
lzma2/ultra   (review memory requirements below before using)
lzma2/ultra64   (review memory requirements below before using)
none

Default value:

lzma2/max
Description:

This specifies the method of compression to use on the files, and optionally the level of compression. Higher levels compress better but take longer doing so, and may also require more memory while compressing/decompressing.

zip is the method of compression employed by .zip files ("deflate"). It is fast in both compression and decompression, and has very low memory requirements (less than 1 MB for both compression and decompression at level 9), but generally does not compress nearly as well as the other supported methods. zip, like lzma2, has one special property, though: it will not expand uncompressible data (e.g., files that are already compressed). If a compression level isn't specified, it defaults to 7.

bzip is the method of compression employed by the bzip2 [external link] compressor. It almost always compresses better than zip but is usually slower in both compression and decompression. Up to 4 MB of memory is required during decompression, and up to 8 MB during compression. If a compression level isn't specified, it defaults to 9.

lzma is the method of compression employed by the 7-Zip LZMA [external link] compressor. It typically compresses significantly better than the zip and bzip methods. However, depending on the compression level used, it can be significantly slower at compressing, and consume a lot more memory. The following table summarizes the approximate memory requirements for each of the supported lzma compression levels. If a compression level isn't specified, it defaults to max.

Decompression (dictionary size)Compression
fast (worst)32 KB3 MB
normal2 MB26 MB
max (default)8 MB95 MB
ultra32 MB372 MB
ultra64 (best)64 MB676 MB

lzma2 is the method of compression employed by the 7-Zip LZMA2 [external link] compressor. LZMA2 is a modified version of LZMA that offers a better compression ratio for uncompressible data (random data expands about 0.005%, compared to 1.35% with original LZMA), and optionally can compress multiple parts of large files in parallel, greatly increasing compression speed but with a possible reduction in compression ratio (see LZMANumBlockThreads). Like LZMA, it can consume a lot of memory; see the above table. If a compression level isn't specified, it defaults to max.

none specifies that no compression be used.

See also:
SolidCompression
LZMAAlgorithm
LZMABlockSize
LZMADictionarySize
LZMAMatchFinder
LZMANumBlockThreads
LZMANumFastBytes
LZMAUseSeparateProcess