Copyright: Shrinker 3.4 Reference, (c) 1990-1999 A.S.M. Inc.


Shrinker 3.4 Online Reference

Welcome to the demonstration version of Shrinker 3.4 from Blink, Inc. The demonstration version is fully functional, the only limitation is that each compressed program will display a message at startup indicating that it was created with the demonstration version of Shrinker.

Shrinker will take almost ANY 16 or 32 bit Windows .EXE, .DLL, .DPL, .DRV or .OCX file or ANY real mode DOS .EXE file and transparently compress it. Compression ratios will vary from file to file, but many files will compress by 70% or more.

Introduction

Installation

Using Shrinker

Run time requirements of compressed programs

Choosing files to compress

Troubleshooting

Error messages

About Blink, Inc.


About Blink, Inc.

Blinkinc is an innovative software company committed to providing high quality programming tools which enable PC software developers to create more powerful and efficient software programs in less time. The strengths of the company lie in the technical excellence of its software, the firm commitment to product development and the prompt and comprehensive technical support offered to registered users.

Blinkinc
P.O.Box 29858
Richmond VA 23242-0858
U.S.A.

Tel (804) 784-2087
Fax (804) 784-2357

http://www.blinkinc.com
sales@blinkinc.com
support@blinkinc.com


License agreement

This is a legal agreement ("Agreement") between you, the end user, and Blink, Inc. ("BLINK"). BY OPENING THE SEALED DISKETTE PACKAGE, YOU ARE AGREEING TO BE BOUND BY THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT, RETURN THE UNOPENED DISKETTE PACKAGE AND THE ACCOMPANYING ITEMS (including all written materials and packaging), WITHIN THIRTY (30) DAYS FROM THE DATE YOU RECEIVED DELIVERY, TO THE PLACE WHERE YOU OBTAINED THEM FOR A REFUND.

1. License BLINK grants you a non-exclusive and non-transferable limited license to use one (1) copy of the computer program(s) contained on the diskettes in this package ("Software") on a single computer, and to use the written materials ("Documentation") accompanying the Software, in accordance with the terms and conditions of this Agreement. You may not share the Software on a network or otherwise use it on more than one computer or computer terminal. This license is for a single individual only. Each individual who desires to use the Software must obtain a licensed copy of the Software from BLINK. BLINK also grants you the right to reproduce and distribute executable files created using the Software, provided that no part of the Software can be separated from those executable files.

2. Copyright and Other Proprietary Rights The Software and Documentation are owned by BLINK, are protected by United States copyright laws and international treaty provisions, and may also be protected by other laws. You may either (a) copy the Software solely for backup or archival purposes, or (b) transfer the Software to a single hard disk or other storage device of a single computer provided that you keep the original solely for backup or archival purposes. You must reproduce and include BLINK’S copyright and other proprietary rights notices on copies of the Software. You may not copy the Documentation. BLINK retains all rights, title, interest, and ownership of, in, and to the Software, copies of the Software, and the Documentation. BLINK reserves the right to modify and/or enhance the Software or Documentation without obligation to notify you of such changes or to furnish them to you.

3. Additional Restrictions You may not loan, rent, lease, or distribute the Software and/or Documentation. You may not assign or transfer this license, the Software, any copies of the Software, and/or the Documentation without first obtaining prior written permission from BLINK. Requests for such permission should be sent to BLINK, at the address listed in this Agreement, and should: (a) set forth the name and address of the proposed transferee of this license, the Software, and the Documentation; (b) state that you agree to retain no copies of the Software or the Documentation upon such transfer; and (c) include a statement signed by the proposed transferee indicating agreement to the terms and conditions of this Agreement. Any unauthorized attempt to sublicense, assign, or transfer any of your rights, duties, or obligations under this Agreement is void. You may not reverse engineer, decompile, or disassemble the Software, and you may not modify, translate, or create derivative works from the Software or Documentation. You agree to protect the Software and Documentation from unauthorized publication, use, reproduction, and/or distribution.

YOU MAY NOT USE, COPY, OR TRANSFER THE SOFTWARE, ANY COPIES OF THE SOFTWARE, AND/OR THE DOCUMENTATION, IN WHOLE OR IN PART, EXCEPT AS EXPRESSLY PROVIDED IN THIS AGREEMENT.

4. Dual Media If the diskette package contains the Software on both 3 1/2" and 5 1/4" size diskettes, then you may use only the diskettes appropriate for your single-user computer. You may not use the other diskettes on another computer, or loan, rent, lease, distribute, or transfer them to anyone.

5. Term This license is effective from the date you open the sealed diskette package and continues until terminated. You may terminate this Agreement at any time by destroying the Software, all copies of the Software, the Documentation, and all other materials accompanying the diskette package. This license shall terminate immediately if you fail to comply with any term or condition of this Agreement, and upon such termination: (a) BLINK shall have the right to seek any legal or equitable remedies that may be available to BLINK; and (b) you shall immediately destroy or return all copies of the Software and Documentation to BLINK, without refund.

6. LIMITED WARRANTY BLINK warrants that the physical diskette(s) (meaning the diskette(s) itself, not the Software) on which the Software is provided will be free from defects in material and workmanship under normal use for a period of thirty (30) days from the date you received delivery.

EXCEPT AS EXPRESSLY SET FORTH ABOVE, BLINK MAKES NO OTHER WARRANTIES OF ANY KIND, AND BLINK HEREBY DISCLAIMS ALL OTHER WARRANTIES, BOTH EXPRESS AND IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR USE OR PURPOSE, AND ANY IMPLIED WARRANTY ARISING FROM COURSE OF PERFORMANCE, COURSE OF DEALING OR USAGE OF TRADE. THE SOFTWARE PROVIDED ON THE DISKETTE(S) AND THE DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.

BLINK DOES NOT WARRANT THAT THE SOFTWARE OR THE DOCUMENTATION WILL MEET YOUR REQUIREMENTS, THAT THE OPERATION OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR FREE, OR THAT ALL DEFECTS IN THE SOFTWARE AND/OR DOCUMENTATION WILL BE CORRECTED. YOU ASSUME SOLE RESPONSIBILITY FOR THE SELECTION OF THE SOFTWARE AND DOCUMENTATION TO ACHIEVE YOUR DESIRED RESULTS AND FOR THE INSTALLATION AND USE OF THE SOFTWARE AND DOCUMENTATION. THE ENTIRE RISK AS TO THE QUALITY, PERFORMANCE, AND RESULTS OF THE SOFTWARE AND THE DOCUMENTATION IS WITH YOU. SHOULD THE SOFTWARE OR DOCUMENTATION PROVE DEFECTIVE YOU, NOT BLINK OR ITS SUPPLIERS, ASSUME THE ENTIRE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

NO ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY BLINK, ITS DEALERS, DISTRIBUTORS, OR AGENTS SHALL CREATE A WARRANTY OR IN ANY WAY INCREASE THE SCOPE OF THIS LIMITED WARRANTY, AND YOU MAY NOT RELY ON ANY SUCH INFORMATION OR ADVICE AS A WARRANTY.

IF THE DISCLAIMER OF IMPLIED WARRANTIES IS NOT PERMITTED BY APPLICABLE LAW, THEN ANY WARRANTIES IMPLIED BY LAW, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE HEREBY LIMITED IN DURATION TO THIRTY (30) DAYS FROM THE DATE YOU RECEIVED DELIVERY.

SOME STATES DO NOT ALLOW LIMITATIONS ON THE DURATION OF IMPLIED WARRANTIES, SO THE ABOVE LIMITATIONS MAY NOT APPLY TO YOU. THIS LIMITED WARRANTY GIVES YOU SPECIFIC LEGAL RIGHTS. YOU MAY HAVE OTHER RIGHTS, WHICH VARY FROM STATE TO STATE.

7. Limitations of Remedies BLINK’S entire liability and your exclusive remedy under this Agreement shall be, at BLINK’S option, either (a) replacement of any diskette which has not met BLINK’S "Limited Warranty" and which is returned to the place where you obtained it, with a copy of your receipt, or (b) refund of the price paid by you for this license to use the Software and Documentation if BLINK is unable to deliver a replacement diskette free of defects in materials and workmanship.

IN NO EVENT SHALL BLINK OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS, BUSINESS INTERRUPTION, LOSS OF DATA OR INFORMATION, PECUNIARY LOSS, OR OTHER INDIRECT, SPECIAL, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE AND/OR DOCUMENTATION, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, EVEN IF BLINK HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN NO EVENT SHALL BLINK’S LIABILITY, HOWEVER FOUNDED, EXCEED THE PRICE PAID BY YOU FOR THIS LICENSE.

SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, SO THE ABOVE LIMITATIONS OR EXCLUSIONS MAY NOT APPLY TO YOU.

8. Export Restrictions You acknowledge and agree that you do not intend to, and will not, export (directly or indirectly) any copies of the Software and/or Documentation, or any technical data contained in the Software and/or Documentation, or any direct product thereof, to any country or destination prohibited by the United States Government, or use or permit the Software and/or Documentation to be used for any purpose prohibited by the same.

9. U.S. GOVERNMENT RESTRICTED RIGHTS The Software and Documentation are provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(l)(ii) of The Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 or subparagraphs (c)(l) and (2) of the Commercial Computer Software - Restricted Rights at 48 CFR 52.227-19, as applicable, as well as the restrictions set forth in this Agreement. Contractor/manufacturer is Blink, Inc., P.O. Box 29858, Richmond, VA 23242-0858, USA, Tel: (804) 784-2087.

10. General The Agreement is governed by the laws of the State of Virginia. If any provision of this Agreement is held void or unenforceable, the remainder shall remain valid and enforceable according to its terms. Should you have any questions concerning this Agreement, or if you desire to contact BLINK for any reason, please write to: Blink, Inc., P.O. Box 29858, Richmond, VA 23242-0858, USA.

YOU ACKNOWLEDGE THAT YOU HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUND BY ITS TERMS AND CONDITIONS. FURTHERMORE, YOU AGREE THAT THIS IS THE COMPLETE AND EXCLUSIVE STATEMENT OF THE AGREEMENT BETWEEN YOU AND BLINK AND THAT THIS AGREEMENT SUPERSEDES ALL PRIOR AGREEMENTS, WHETHER VERBAL OR WRITTEN, AND ANY OTHER COMMUNICATIONS RELATING TO THE SUBJECT MATTER OF THIS AGREEMENT. THIS AGREEMENT MAY BE MODIFIED ONLY BY A WRITING SIGNED BY YOU AND BLINK.


Error messages

General error messages

1001: <filename> requires a larger file alignment to compress successfully.

This message indicates that the specified 16 bit Windows program must be recreated with a larger file alignment before it can be successfully compressed.

1002: <filename> is already compressed so cannot be compressed again.

This message indicates that Shrinker has detected that the specified file has already been compressed. Shrinker will not compress files which have already been compressed, since they will not usually run. Please refer to the Shrinker Information screen for more information about the file.

1003: Error compressing input file.

This message indicates that an error occurred while compressing the input file. Please check that you have full access rights to the input file and that it is not currently executing.

1004: <filename> is a DOS extended program so cannot currently be compressed.

This message indicates that the specified file is a DOS extended program. Shrinker does not currently support compression of DOS extended programs.

1005: <filename> imports too many DLLs to compress.

This message indicates that the specified file contains imports for a very large number of external .DLLs. Please contact technical support with details of the file being compressed.

1006: <filename> is too large - try compressing with SHRINK32.

This message indicates that the specified file is too large to compress with the 16 bit Shrinker. Please try compressing the file with the 32 bit Shrinker SHRINK32.EXE instead.

1007: Unable to find or open input file <filename>.

This message indicates that Shrinker was unable to access the specified file. Please check that the file exists and that you have sufficient access rights to the file.

1008: Unable to create or overwrite file <filename>.

This message indicates that Shrinker was unable to write to the specified file. Please check that the file is not currently executing or marked read only, and that you have ‘create’ access rights in the specified directory.

1009: Error reading input file.

This message indicates that an error occurred while reading the input file. Please check that you have sufficient access rights to the input file, that it is not currently executing, and that it is a valid executable program which will run uncompressed.

1010: Unable to rename file <filename>.

This message indicates that Shrinker was unable to rename the specified file. Please check that the file is not currently executing or marked read only, and that you have ‘write’ and ‘rename’ access rights in the specified directory.

1011: <filename> was not compressed as the savings were not significant.

This message indicates that the size of the compressed input file would not be significantly less than the original size, so it was not created. Use the ‘Always Compress’ option to override this behaviour.

1012: Unable to compress <filename> - TLS data at unusual address.

This message indicates that the specified file contains Thread Local Storage data in a location within the image which is not supported by the version of Shrinker you are using. Please check the web site at www.blinkinc.com for the latest updates, in case it is supported in a newer version.

1013: File <filename> is not a recognisable executable program.

This message indicates that specified file name is not a valid DOS real mode, 16 or 32 bit Windows executable program, so cannot be compressed by Shrinker. If this is not the case, the file may well have become corrupted and should be reinstalled.

1014: Unable to locate Win 32 loader in file <filename>.

This message indicates that Shrinker was unable to find the Win 32 program loader. This indicates that the Shrinker program files have become corrupted and Shrinker should be reinstalled.

1015: Not enough memory to perform compression.

This message indicates that there is not enough memory available to Shrinker for it to perform compression. Please make more memory available by closing some programs (Windows) or removing some TSRs or device drivers (DOS).

1016: Unable to create output file <filename> or the disk is full.

This message indicates that Shrinker was unable to create the output file. Please check that a file of the same name is not currently executing or marked read only, that you have ‘create’ access rights in the specified directory, and that there is sufficient space available on the specified disk.

1017: Error writing output file or the disk is full.

This message indicates that Shrinker was unable to write to the output file. Please check that a file of the same name is not currently executing or marked read only, that you have ‘create’ access rights in the specified directory, and that there is sufficient space available on the specified disk.

1018: Shrinker file <filename> is corrupt - please reinstall.

This message indicates that the specified Shrinker program file has been corrupted and should be reinstalled.

1019: Processing was interrupted by user intervention.

This message indicates that the compression process was interrupted by the user selecting ‘Cancel’ (Windows) or pressing Ctrl Break (DOS).

Command line error messages

1101: No input file name was specified.

An input file name must always be specified in order to run the command line version of Shrinker.

1102: Not enough memory to initialise.

This message indicates that there was not enough memory to start Shrinker. Please make more memory available by removing TSRs or device drivers.

1103: <filename> already exists (batch mode).

This message indicates that the specified output file name already exists but Shrinker was running in batch mode so did not prompt to overwrite the file.

1104: Invalid command line option or value <string>.

This message indicates that the specified string appeared on the command line but is not a valid Shrinker option.

1105: Invalid option or value <string> in SHRINKER environment variable.

This message indicates that the specified string appeared in the SHRINKER environment variable but is not a valid Shrinker option.


Introduction

Introduction to Shrinker

Introduction to data compression

Registration and technical support

License agreement


Introduction to Shrinker
Introduction

Introduction to Shrinker

Shrinker will take almost ANY 16 or 32 bit Windows .EXE, .DLL, .DPL, .DRV or .OCX file or ANY real mode DOS .EXE file and transparently compress it. The program remains in this compressed form until it is executed, at which time it is transparently expanded into memory and executed in an uncompressed form.

Compression ratios will vary from file to file, but many files will compress by 70% or more.

Benefits of compression include reduced distribution and storage costs, reduced LAN, WAN and Internet traffic and protection against decompilers and disassemblers.

Distribution costs are significantly reduced, both for physical distribution on diskettes and for electronic distribution via communication networks such as the Internet.

Local and Wide Area Network traffic is reduced because the size of actual data transmitted is reduced, and the workstation decompresses the program locally.

Once a file is compressed there is currently no way to restore the original file, so please keep the original file while testing or if it may be needed at a future time.


Introduction to data compression
Introduction

Introduction to data compression

Data compression consists of finding repeating patterns within the data and storing an abbreviated form of the pattern instead of the original, thus reducing the size of the data. When the data is decompressed for use, the patterns are recreated from the table of patterns and the abbreviated form of the pattern.

Compression tools can typically be divided into 2 categories, disk compression and file compression.

Disk compression tools usually operate at the operating system level, and transparently compress all data stored on the disk regardless of its type or usage.

File compression tools usually take the form of user initiated archiving or backup tools, and are used to create compressed versions of selected files for backup storage. The archived files must always be manually dearchived or decompressed before they can be used.

Shrinker works at the individual file level, but has the advantage of transparent decompression at run time, providing the benefits of selective compression and transparency.


Registration and technical support
Introduction

Registration and technical support

Blinkinc offers free technical support in the U.S. and Canada as described below to registered customers. Technical support details for other countries are provided later in this section.

Important: Please complete and mail the enclosed registration card. Technical support and product upgrades are only made available to registered users.

Who can call?

We support one user per registered product - the individual named on the product registration card. While we offer a high quality technical support service to registered users, it is not our policy to support multiple users of a single registered product.

Customers wishing to change the individual to whom technical support is given during the free support period may do so in writing to the address given on the next page.

Web site

Blinkinc maintains a comprehensive Web site for all its products and services at www.blinkinc.com. The web site contains the latest press releases, updates and patch files for all our products, along with technical support bulletins and files of general interest to developers. Suggestions for improvements are always welcome.

Electronic mail

Blinkinc provides technical support to registered users via the email address support@blinkinc.com. In order to ensure prompt service, please always provide your product name, version and serial number along with your name and company. Messages are usually answered within 48 hours.

Telephone and facsimile support for U.S. and Canadian customers

Please make a concerted effort to find the answer in this manual or on our web site before you call. However, if you are still having difficulties, you may phone us in the U.S. at (804) 784-2347 between the hours of 0930 and 1730 Eastern Standard Time. Our U.S. fax number is (804) 784-2357.

When you call for support we will require the following information to resolve your problem as quickly as possible:

·	Your Shrinker serial number and version number.

·	A brief description of the problem, including the Shrinker error message.

·	The name of the file that was compressed, and, if known, the name and version number of the language compiler used to create it.

Telephone support will be provided free of charge to registered users for a period of 90 days for any questions directly relating to Shrinker. After this period you may join the Blinkinc Developers’ Club for a nominal fee which entitles you to free fax support and interim updates mailed as they become available. Please call for further details.

U.S. mail

Our U.S. address is:

Blinkinc
P.O. Box 29858
Richmond VA 23242-0858
U.S.A.

European customers

If your Shrinker serial number is prefixed with "SE" you are entitled to 90 days free technical support through our European distributors.

If your Shrinker serial number begins with "SA" you have obtained an American version of the software. You will not be entitled to free technical support in Europe and will also be required to pay any additional shipping & handling charges and customs duties on upgrades shipped directly from the U.S. You may contact Blinkinc to obtain an upgrade to a European version of the software to alleviate these problems.

We have done our utmost to reduce the price discrepancy between the cost of our software license in the U.S. and Europe, but cannot prevent the "grey importing" of U.S. software. We urge you to take the matter up with the distributor concerned if this causes you any inconvenience.

Overseas

All our overseas distributors have agreed to provide Shrinker registered users with 90 days free technical support, so please contact your local distributor.


Shrinker license agreement
Introduction

Shrinker license agreement

The Shrinker license agreement is printed on the front of the sealed Shrinker product envelope and is in the online help file. Please refer to these sources for details of the license agreement.

License agreement


Installation

Before installing Shrinker, please take a few minutes to fill out and return the enclosed registration card. It is essential that you do this in order to receive your 90 days of free technical support, and to be eligible for further support and future upgrades to the product.

To install Shrinker, insert the diskette in the floppy drive and from Windows run or select :

X:\SETUP.EXE

where X: is the drive letter containing the distribution diskette. The installation program will prompt you for the installation drive and folder, and will install the software in the specified folder.


Using Shrinker

Under Windows 95, 98 and NT the 32 bit Shrinker (SHRINK32.EXE) will be installed as the first icon in the Shrinker group. The 16 bit Shrinker (SHRINKER.EXE) can run as both a Windows and a DOS program, and automatically senses the environment in which it is being run.

The automatic detection of Windows programs by Windows 95, 98 and Windows NT causes SHRINKER.EXE to always run as a Windows program, even from a DOS box. For this reason, the file SHRINKER.COM has been provided to ensure that Shrinker runs as a DOS program from a DOS prompt.

To run Shrinker as a DOS program, type SHRINKER at the DOS prompt, or include it in a batch file, with no file extension, or with the explicit extension .COM.

Shrinker command line options (prefixed with - or /, and case insensitive) are applicable whether running Shrinker as a Windows or a DOS program, and are detailed later in this chapter.

The check boxes and controls in the Windows user interface automatically reflect any filenames and options specified on the command line.

The input file to be compressed must always be specified, but if no output file is specified then the compressed file will be created with the input file name and the original input file will be saved with an extension of .BAK.

Using Shrinker under Windows

Compression options

Win 32 compression options

Using Shrinker under DOS

Command line options

SHRINKER environment variable


Using Shrinker under Windows
Using Shrinker

Using Shrinker under Windows

To use Shrinker under Windows, simply select one of the two Shrinker shortcuts or icons which were set up by the installation program. The shortcut ‘Shrink32’ (SHRINK32.EXE) is the 32 bit version which supports long file names, while the shortcut ‘Shrinker’ (SHRINKER.EXE) is the 16 bit version.

Note that both EXEs will produce identical output files for the same input file, and can both be used to compress all types of programs. The only functional difference between the two .EXEs is the ability of Shrink32 to use long file names for the input and output files.

The Shrinker main screen, or Files screen, is displayed immediately, and is shown on the next page.

Various compression options can be set by selecting the Options screen from the tabs at the bottom of the screen. Other informational screens will also become available once a file has been compressed.

The Files screen allows the user to select the file to be compressed and the name of the new compressed file if the original file is not to be overwritten.

To compress a file with the default options simply select the Compress button at the top of the screen. The progress bars are continually updated while compression is performed, and processing can be interrupted by selecting Cancel at any time.

Shrinker Files screen

Once compression is completed, two more screens become available on the tabs at the bottom of the screen. The first, the Information screen, displays informational messages about the program type of the input and output files.

Shrinker Information screen

The second, the Results screen, shows a graphical representation of the savings made by compressing the input file. The colors can be configured on the Options screen detailed in the next section.

Shrinker Results screen


Compression options
Using Shrinker

Compression options

A number of compression options for the more advanced user are available on the fourth screen, the Options screen, shown below. These options always reflect command line and environment settings, and can be saved permanently by checking the ‘Save Options on Exit’ checkbox.

Shrinker Options screen

Use of most of these options should not be necessary under most circumstances, as the defaults provide the best results for most programs.

The ‘Compression Factor’ scrollbar is used to change the compression factor from its default value of 9. The higher the compression factor, the better the compression, and so the smaller the resulting output file.

Achieving the best compression may take slightly longer, so a smaller compression factor may be used during testing to save time. There are no detrimental effects to using the maximum compression for the final version, so this is the default setting.

The ‘Compression Method’ section is used to select how Shrinker compresses files. ‘Smart Compression’ is the default, in which case Shrinker will only compress the file if there is a saving in file size over the uncompressed size.

The ‘Always Compress’ checkbox forces Shrinker to always create the output file, even if there is no significant decrease in the file size. This option can be used to obtain the benefit of protection against decompilers even when the savings due to compression are not significant.

This option should be used with care with files which are already compressed with a compression utility, since there is a risk they may not run after being compressed a second time.

The ‘Create .BAK Backup File’ checkbox forces Shrinker to save the original input file with a file extension of ‘.BAK’ if no output file name was given, since the original file will be overwritten with its compressed form. This checkbox is enabled by default.

The ‘Overwrite Existing Output Files’ checkbox forces Shrinker to overwrite any output files without prompting, even if they already exist. This option should be used with care if a backup of the input file has not been made.

The ‘Update Date and Time Stamp’ checkbox forces Shrinker to stamp the output file with the current date and time, rather than the default, which is to retain the same date and time as the input file.

The ‘Save Options on Exit’ checkbox causes Shrinker to save the state of all the option settings when it exits. Whenever Shrinker is restarted, the saved state of the options is automatically restored.

Note that the saving and restoring of option settings only applies to the Windows version of Shrinker.

Command line and environment settings will always override the saved option settings, with the command line taking priority over the environment when there is a conflict.

The ‘Block Size’ scroll bar is used to change the size of the blocks into which a 32 bit program is divided for compression. The default of 32 Kb, the largest size, gives the maximum compression ratio, while smaller block sizes may occasionally improve performance slightly since smaller blocks are decompressed at run time.

The ‘Colors’ section is used to change the colors of the graph on the Results screen.

The ‘Default’ button restores all option settings to their default values.


Win 32 compression options
Using Shrinker

Win 32 compression options

The ‘Advanced’ button on the Options screen displays a second screen of advanced options which are specific to the compression of 32 bit programs.

Shrinker Advanced Options screen

By default, all Win 32 resources except Version information and the first icon are compressed, giving the maximum overall compression. If resources are compressed they will still be available to the program while it is running, but not to external programs which read the resources directly from the file, such as the Windows Explorer or Program Manager. In certain cases it may be necessary to disable compression of other types of resources using the ‘Resource Compression Options’ section, so that the resources are available to these external programs.

For example, when registering .OCX files, the bitmap resources may be required by the host program in order to display options on a toolbar. Selecting the ‘Do Not Compress Bitmaps’ option will leave all bitmaps uncompressed so that they are available to external programs.

The ‘Preload Options’ section is used to select which types of sections Shrinker will preload into memory before starting the actual program. The preload options should only be necessary in extremely unusual situations, so are all disabled by default.


Using Shrinker under DOS
Using Shrinker

Using Shrinker under DOS

To use Shrinker from DOS, simply type:

SHRINKER InputFile [OutputFile] [options]

at the DOS prompt, or include the same in a batch file. To display a summary of the command line options, run Shrinker with no command line parameters, or with the /? option.


Command line options
Using Shrinker

Command line options

Shrinker command line options are prefixed with - or / and are case insensitive. They are applicable to both the Windows and the DOS versions of Shrinker. The options are as follows:

-B	Batch mode
Disable prompting for overwriting of output files or other user intervention.

-BQ 	Batch Quiet mode
Disable all Shrinker output.

-CA 	Compress Always
Always compress the input files.

-CBn	Compress with Blocksize n
Set the unit compression size of 32 bit programs.

-CFn	Compress with Factor n
1 = fastest compression through to
9 = slowest compression, smallest output file.

-CS  	Compress Smart
Only compress input files if the output will decrease in size.

-MH	Message Help
Display simple help screen.

-MV	Message Verbose
Display informational messages.

-OB 	Create Backup file
Create .BAK backup file of input file.

-OD	Output set Date & time
Set output file date and time to today.

-ON	Output No backup file
Do not create .BAK backup file.

-OO 	Output Overwrite
Always overwrite existing output files.

-PA 	Preload All sections

-PC 	Preload Code sections

-PD 	Preload Data sections

-PR  	Preload resource sections
These options cause preloading of the various sections of 32 bit programs.

-RA 	Resource compress All

-RB+ 	Resource Bitmap compress

-RB- 	Resource Bitmap no compress

-RI+ 	Resource Icon compress

-RI- 	Resource Icon no compress

-RIF  	Resource Icon except First

-RN 	Resource compress None

-RB+ 	Resource Other compress

-RO- 	Resource Other no compress
These options control which resources of a 32 bit program are compressed.

For more details on the meaning of each of these options please refer back to the section ‘Compression Options’.


SHRINKER environment variable
Using Shrinker

SHRINKER environment variable

Commonly used Shrinker options can also be set in the SHRINKER environment variable, which is read by both the Windows and the DOS versions of Shrinker.

Settings in the SHRINKER environment variable are identical to the command line options detailed in the previous section, with the exception of the input and output file name, and should be separated by spaces, e.g.

SET SHRINKER=/OO /CA

This example forces Shrinker to always overwrite the output file without prompting and to always compress the input file, even if there is an increase in size.


Run time requirements of compressed programs
Using Shrinker

Run time requirements of compressed programs

Shrinker compresses files for distribution and storage, but since the program is decompressed into memory at run time, Shrinker does not reduce the run time memory requirements of the program.

There is minimal impact on the load time of a compressed program, and no impact on the execution speed of the program once it has been loaded.

Compressed DOS programs require about 40 Kb of extra available memory to load, but have no overhead or extra memory requirements once the program starts running.

Compressed Windows programs require about 40 Kb of extra memory from Windows at run time. This memory is used to decompress parts of the program which are only loaded and decompressed on demand.

Compressed Win32 programs will run under Windows 95, 98 and Windows NT versions 3.51 and later, but will not currently run under WIN32S on Windows 3.1.


Choosing files to compress

Shrinker will take almost any 16 or 32 bit Windows .EXE, .DLL, .DRV or .OCX file or ANY real mode DOS .EXE file and transparently compress it.

Typically, the larger the file the better the compression achieved, and for best compression be sure to set the compression factor to the maximum , i.e. 9, on the Options screen of Shrinker for Windows. Maximum compression is the default setting.

Certain Windows system files such as KERNEL32.DLL, KRNL286.EXE, KRNL386.EXE, USER32.DLL etc. should not be compressed, nor should particularly small files since the benefit is minimal.

.EXEs created with Microsoft FoxPro versions 3.0 and later will not compress because they consist of a small stub .EXE with the rest of the program attached as data to the end of the .EXE file, and there is currently no way to decompress this data at run time.

Certain 32 bit Windows console applications, such as Borland’s command line compilers and TDUMP.EXE, will also run under plain DOS through the use of a 32 bit DOS extender. If you compress these types of programs they will still run under 32 bit Windows, but the DOS extender will be unable to load and execute them under plain DOS.

Windows .DLLs compressed with Shrinker will not currently load and run with DOS extended programs, such as those linked with Blinker or the Borland Power Pack.

CodeView debugging information is automatically recognised and removed from compressed files, but other information is left in the .EXE in case it is needed, such as setup scripts etc.


Troubleshooting

If an error occurs while loading a compressed Windows program, a message box containing an error message will be displayed, and a small file named SHRINKER.ERR will be created in the current directory. This file will also contain the error message identifying the problem. Please have the contents of this file available when calling technical support.

If running a compressed program gives a run time error which does not occur when running the uncompressed version, the preload options can be used to force the named sections to be loaded into memory at program start up, which may solve the problem.

Initially try preloading all resources, and if that solves the problem then try just preloading the individual section types. The preload options should only be necessary in extremely unusual situations.

The Information screen will indicate a number of characteristics of the file being compressed, such as the type of program, whether it has already been compressed, and whether it contains debugging information or other extra information. This can help with identifying a problem with a compressed program.

CodeView debugging information is automatically recognised and removed from compressed files, but other information is left in the .EXE in case it is needed, such as setup scripts etc.

Provided this information is accessed relative to the end of the file there should not be a problem, but if the information is accessed relative to the start of the file this will no longer work, as the main part of the file will have changed in size.


Shrinker error messages

Please refer to the online help file for a detailed description of the Shrinker error messages.