PECompact v0.975 beta
(c)1999 by Jeremy Collake
All Rights Reserved.
Email: collake@charter.net
Homepage: http://webpages.charter.net/collake
http://pecompact.cjb.net
This software is provided as-is, without warranty of ANY KIND,
either expressed or implied, including but not limited to the implied
warranties of merchantability and/or fitness for a particular purpose.
The author shall NOT be held liable for ANY damage to you, your
computer, or to anyone or anything else, that may result from its use,
or misuse. Basically, you use it at YOUR OWN RISK.
PECompact is a utility that compresses Windows 9x/NT4/w2k executables
and DLLs, while leaving them 100% functional. PECompact compresses the
code, data, selected resources, import/export table of a win32
executable and optimizes its structure. It then installs a symbiote which
decompresses the executable at run-time without any noticeable speed
difference. Load time can actually be improved in some cases because
less data has to be retrieved from the disk or network.
Features
- Written in 100% assembly language for maximum performance and
minimum size.
- Compresses Windows executables and DLLs significantly, while leaving
them 100% functional.
- Compresses code, data, import/export table, and selected
resources.
- Trim only feature allows for relocation stipping and PE structure
optimization without compression or symbiote installation.
- Advanced section merging and resource data restructuring capabilities.
- Trims, optimizes, and realigns PE structure.
- Preserves shell icon and version information, or any other
resources you chose to leave uncompressed.
- Uses its own JCALG1 compression library, which offers decent compression
speed, great compression ratio, and extremely rapid decompression.
- Removes debug information and other optional directories from
the executable prior to compression.
- Sets new, correct checksum in PE header.
- Compatible with all win32 operating systems (win95,win98,NT,w2k,etc)
- Highly configurable and easy to use.
- Shell extension support.
- And much more..
version 0.975 changes
- DLL re-entrancy fix.
- Relocation table alignment fix.
- Symbiote size decreased.
- Added proper handling of shell icons and an option
to set the number of shell icons to preserve.
- Improved compression ratio, compression speed, and
decompression speed.
- Added check for executables with another symbiote already
installed.
- Updated to JCALG1 r4.45.
- Fixed slider control lower boundary when using arrows.
- Floating percentage is now current compression ratio.
- Compress export table toggle now correctly defaults to off
when a DLL is chosen.
- GUI changes.
- Lots of other misc. fixes.
Usage
PECompact can be run without any parameters, however it also accepts
the following command line syntax:
PECompact [filename] [switches]
Switches
- /A
Automatically invoke/exit PECompact without user intervention.
- /X
Automatically exit PECompact after compression completed.
- /T
Trim only, do not compress.
- /M[-]
Toggle on/off section merging.
- /R[-]
Toggle on/off resource restructuring.
- /E[-]
Toggle on/off compression of export table.
- /I[-]
Toggle on/off compression of shell icons.
- /B[-]
Toggle on/off backup of file.
- /O[-]
Toggle on/off copying of overlay.
- /S[-]
Toggle on/off stripping of relocations.
- /L[-]
Toggle on/off usage of windows DLL loader.
Command line switches override a saved configuration.
Options
Toggles
- Restructure Resource Data
On/Off toggle to restructure resource data in a manner more
friendly for compression.
- Merge Sections
On/Off toggle to merge compressible sections, therefore
reducing the overhead of file alignment in the PE structure.
- Strip Relocations
On/Off toggle to strip relocations (fixups) from the PE. It
should be safe to do this for all win32 EXEs, however you
should not strip the relocations from DLLs unless you know
what you are doing.
- Compress Export Table
On/Off toggle to allow compression of the export table. You
should turn this off for DLLs.
- Use Windows DLL Loader
On/Off toggle to disable compression and symbiotic handling of
the import table. Turning this option on will leave the original host
import table in-tact, allowing the windows DLL loader to handle imports.
- Copy Overlay
On/Off toggle to copy data appended to the end of the PE.
Some applications append extra data to the end of the
executable; if this data is necessary, then check this option.
Note that many install applications either use a static
address for the overlaid data, or perform an executable size
verification and may still not work even though the overlay
is properly copied. There isn't much I can do about this
problem, I suggest all software authors which use overlaid
data properly compute the location of it by adding the last
section physical offset and size.
- Backup File
On/Off toggle to backup the file before compression. Backup
file will have a .bak extension appended.
- Compress shell icons
By default, PECompact attempts to preserve the shell icons (the
icons available for explorer to display). If you would like to
compress these icons anyway, then check this option.
- Resource Types
Allows you to specify which resource types may be compressed.
- Compression Level
This slider allows you to adjust the level of compression. This
will only affect compression speed and ratio, decompression
speed will not be affected in any significant way.
- Do Not Compress, Trim Only
This option will disable compression and installation of the PECompact
symbiote. The executable will be trimmed and realigned only.
Menu Options
- Configuration / Restore Defaults
Select this menu option to restore configuration to its
default state.
- Configuration / Save Configuration
This option will save the current PECompact configuration,
which will act as the default for each subsequent run.
- Configuration / Register Shell Extension
Select this menu option to register PECompact as a shell
extension, adding it to the explorer menu for EXE files.
License
This program is free for non-commercial use. If you plan to use PECompact
on an application which will be distributed as shareware, you must register
PECompact for $20 USD. For a commercial/retail license you must contact the
author at collake@charter.net for price negotiation.
To register your copy of PECompact for shareware use, please send a
check or money order for $20 to:
Jeremy Collake
PO BOX 426
Talbott, TN 37877
Include your name or company name, mailing address, email, and
optionally your phone number. Indicate whether you wish to have the
registered version of PECompact sent to you via email, or mailed to
you on a 3.5" disk.