Switch -MD<n>[k,m,g] - select the dictionary size


Sliding dictionary is the memory area used by compression algorithm to find and compress repeated data patterns. If size of file being compressed (or total files size in case of solid archive) is larger than dictionary size, increasing the dictionary is likely to increase the compression ratio, reduce the archiving speed and increase memory requirements.

For RAR 4.x archive format the dictionary size can be: 64 KB, 128 KB, 256 KB, 512 KB, 1 MB, 2 MB, 4 MB.

For RAR 5.0 archive format the dictionary size can be: 128 KB, 256 KB, 512 KB, 1 MB, 2 MB, 4 MB, 8 MB, 16 MB, 32 MB, 64 MB, 128 MB, 256 MB, 512 MB, 1 GB.

You can use 'k', 'm' and 'g' modifiers to specify the size in kilo-, mega- and gigabytes, like -md64m for 64 MB dictionary. If no modifier is specified, megabytes are assumed, so -md64m and -md64 are equal.

When archiving, WinRAR needs about 6x memory of specified dictionary size, so 512 MB and 1 GB sizes are available in 64 bit WinRAR version only. Maximum archiving dictionary size is even smaller and equal to 128 MB, when running in Windows XP x86. When extracting, slightly more than a single dictionary size is allocated, so both 32 and 64 bit versions can unpack archives with all dictionaries up to and including 1 GB.

WinRAR can reduce the dictionary size if it is significantly larger than source data size. It helps to reduce memory requirements without decreasing compression.

Default sliding dictionary size is 4 MB for RAR 4.x and 32 MB for RAR 5.0 archive format.

ZIP archives created by WinRAR always use 32 KB dictionary.

Dictionary size can also be selected in Dictionary size list in "Archive name and parameters" dialog.

Example

create a solid archive in RAR 5.0 format with 128 MB dictionary

WinRAR a -s -ma -md128 lib *.dll




Posted on line by http://www.winrar-france.com