Compression
Previous Top Next

Menu -> Options -> Compression

clip0518



Selecting the Major Compression Mode

Thinstall offers 3 Major compression modes:

Compress for fastest loading
Use this option when the loading time of your application is very important, or it needs to have the smallest memory footprint and size is not important to you. When this option is used the memory requirements for your program are 1-block for each open virtual file, i.e. if the block size is 64k, then 64k is allocated for each open virtual file.

Compress for smallest size
Use this option when you want to create the smallest EXE size at the expense of slower loading times and slightly higher memory usage. Decompression speeds are about 5-10 times slower than the first option. When this option is selected the memory requirements for your program are as follows:

· 6 times the block size is reserved for the program (per application instance)
· 1 block-size unit is allocated for each open virtual file

If your application takes more than a second to load, you may want to consider using Thinstall's Loading Splash Screen feature which allows an image to be displayed while your program is loading.

No Compression
This option offers very little data security and should only be used during development & testing. When this option is used, the raw contents of your files are written directly to the EXE and can be found using a hex editor.

The Build Cache
To speed up build times, Thinstall stores copies of blocks of data it has previously compressed in the cache directory. The cache directory is located at
C:\Documents and Settings\USERNAME\Application Data\Thinstall\build_cache

To prevent this directory from consuming too much space on your hard drive, Thinstall limits the maximum size occupied by files in this directory to 50MB. By setting the maximum build cache size to 0, Thinstall will not use a build cache. The maximum size for the build cache is 4GB. When all of your file data has been previously compressed, the build time for compressed EXEs is approximately the same as uncompressed EXE.





Selecting the Compression Block Size

You can select a compression block size from one of the following choices:

Block Size
Fast Compressor
Memory Required Per Running Application
Fast Compressor
Memory Required Per Open Virtual File (*)
Small Compressor
Memory Required Per Running Application
Small Compressor
Memory Required Per Open Virtual File (*)
16k
16k
16k
96k
16k
32k
32k
32k
192k
32k
64k
64k
64k
384k
64k
128k
128k
128k
768k
128k
256k
n/a
n/a
1.5MB
256k
512k
n/a
n/a
3MB
512k
1MB
n/a
n/a
6MB
1MB
2MB
n/a
n/a
12MB
2MB
4MB
n/a
n/a
24MB
4MB


(*) When a virtual file is open which is smaller than the block-size, the full block-size is not allocated.

The default selection is 64k as it provides a balanced choice between speed, memory consumption, and compression ratio.
To achieve the highest level of compression, you should select a higher block size.

Note, that when selecting "Compress for fastest loading", block sizes over 128k automatically use 128k.





Patching / Block Synchronization
This option allows you to select variable compression block sizes enabling upgrade/patching programs to find more commonalities between 2 versions of your application.
Click here for more information about Thinstall and Patching Software.

Variable Block sizes approximated using rolling-checksum
When this option is selected, Thinstall will use a variable compression block size. Compression block sizes are calculated based on a rolling-checksum of the application data. This option does not yield as high compression as fixed block sizes, however it permits patching programs to find more common data between different versions of your software. All blocks sizes will be between 0.25 * BlockSize and 1.0 * BlockSize. Because block sizes are smaller on average, a lower compression ratio is achieved than fixed block sizes.

Block sizes constant (fastest build time, best compression)
When this option is selected Thinstall will use a fixed block size, which can yield slightly higher compression ratios. When this option, creating a patch to upgrade one version of your Thinstall-packaged EXE to another may not find any common data blocks for files that have changed slightly.




Selecting per-file Compression Options

By default, after adding a new file to your project it will use the project compression global setting (shown above). You can override this to force an individual file to compress differently by using the right-click menu associated with the file. As with other right-click options, you can select multiple files at the same time and apply your selection to all of them at once.

clip0190