here is a way to reduce a CHM file .. and i have tested it and its great on general cases.
a- tools required
1- "key tools" from
http://www.keyworks.net/keytools.htm (download and install)
2- posted "PureHELP Compiler" from
http://freenet-homepage.de/gnozal/PureHELPC.zip (unpack to its folder)
3- posted "MScompiler" from
http://freenet-homepage.de/gnozal/MSHelpCompiler.rar (unpack to "PureHELP Compiler" folder)
b- the process
1- "decompile" with "Key Tools" .. this tool will generate (*.HHP) project file that can mimic the original project file (and i think its about 100% ok as the author of "key tools" was a the project leader in microsoft of MS-HTML (which is CHM)) and make a folder for the unpacked CHM
2- then optimize using procedures as follows:
================================================== ===
if you need a real optimizer for CHM then it exist in my mind..
1- optimize HTML by removing comments and other non-viewable ref.
2- optimize GIF files with Trout's GIF Optmizer.
3- optimize PNG files with optipng,advpng,advdef,pngout,deflopt
4- optimize jpeg files with "jpegoptim"
even more..can be done on stage (2)
if gif files are still type (one frame) then convert to PNG with optipng and replace its name.gif with name.png in all html files..(this one is best in reducing CHM file..)
================================================== ===
3- then compile using "PureHELP Compiler" by
- set the compiler in "options" into the HHC.EXE from "MSHelpCompiler.rar"
- then choose the HHP file in the unpacked CHM folder.
- then press compile
4- then you have two choices:
1- to "recompile" with "keytools" into a new CHM file (to check it increases or decreases the files..) then use "document process v6.01"
2- or the vice-versa
both choices should give you same result..( a smaller CHM file)
and thats it..
here is an example:
windows.chm from XP-home-sp2 (690,641 bytes)
1- "document press" only (411,102 bytes)
2- "PureHELP Compiler" as there nothing to optimize.. (250,703 bytes)
3- after "document press" again (224,304 bytes)
4- then "keytools" reompile.. (191,566 bytes)
or if 4 is before 3..
4- then "keytools" reompile.. (191,566 bytes)
3- after "document press" again (191,566 bytes)
so in this file "doument press" done nothing,, but this is one of the cases as someitmes "keytools" increase size not decrease..
I hope this info is good..