[Setup]: LZMANumBlockThreads

Inno Setup

[Setup]: LZMANumBlockThreads

Valid values:

1 through 32

Default value:

1
Description:

When compressing a large amount of data, the LZMA2 compressor has the ability to divide the data into "blocks" and compress two or more of these blocks in parallel through the use of additional threads (provided sufficient processor power is available). This directive specifies the number of threads to use -- that is, the maximum number of blocks that the LZMA2 compressor may compress in parallel.

The memory required during compression when multiple block threads are used is roughly:

LZMANumBlockThreads * (Normal memory usage + (LZMABlockSize * 2))

Since LZMA2 (and LZMA) uses two threads for match-finding by default (see CompressionThreads), there ideally should be two processor cores available for each block thread. Thus, to see the maximum benefit from a value of 2, four cores are needed.

Dividing the data into multiple blocks can reduce the compression ratio, as the compressor cannot find matches across blocks. Using a large block size can help to mitigate this.

If an "Out of memory" error is seen when multiple block threads are enabled in combination with a compression level that uses a large dictionary size (such as ultra64), LZMAUseSeparateProcess may need to be set.

See also: LZMABlockSize