Refine compression of Windows installer

I increased the efficiency of LZM compression of makecab. I found that we can use .Set CompressionMemory=21 setting. This setting produces 83,91% of original installer size and if we combine it with a simple zip compression the download size can reduce to 83,54%.

Reference:
http://www.mail-archive.com/libreoffice@lists.freedesktop.org/msg07068.html
This commit is contained in:
Kalman Szalai - KAMI 2011-03-02 01:25:13 +01:00
parent 03271a21b9
commit 3268af2a1a
2 changed files with 5 additions and 2 deletions

View file

@ -415,7 +415,7 @@ BEGIN
$one_cab_file = 0;
$fix_number_of_cab_files = 1;
$cab_file_per_component = 0;
$cabfilecompressionlevel = 7;
$cabfilecompressionlevel = 21; # Using LZX compression, possible values are: 15 | 16 | ... | 21 (best compression)
$number_of_cabfiles = 1; # only for $fix_number_of_cab_files = 1
$include_cab_in_msi = 0;
$use_packages_for_cabs = 0;

View file

@ -64,7 +64,10 @@ sub write_ddf_file_header
push(@{$ddffileref} ,$oneline);
$oneline = ".Set Compress=ON\n";
push(@{$ddffileref} ,$oneline);
$oneline = ".Set CompressionLevel=$installer::globals::cabfilecompressionlevel\n";
# The window size for LZX compression
# CompressionMemory=15 | 16 | ... | 21
# Reference: http://msdn.microsoft.com/en-us/library/bb417343.aspx
$oneline = ".Set CompressionMemory=$installer::globals::cabfilecompressionlevel\n";
push(@{$ddffileref} ,$oneline);
$oneline = ".Set Cabinet=ON\n";
push(@{$ddffileref} ,$oneline);