D J P ~~~~~ executable file compressor for DJGPP V2 version 1.07 by ML1050 Copyright (C) 1996, 1997, 1998 What is It? ~~~~~~~~~~~ DJP is a fast and small executable file compressor for files produced by DJGPP V2. It uses an algorithm called LZO1X, which achieves an average compression ratio of about 0.56 on executable files, and can decompress at about 6-8 Mbytes/sec on an AMD 486DX4-100 with no memory overhead. (Decompression speed is defined as uncompressed size/decompression time.) How to Install? ~~~~~~~~~~~~~~~ If you have the binary distribution: unzip mlp107b.zip or pkunzip -d mlp107b.zip If you have the source distibution: unzip mlp107s.zip or pkunzip -d mlp107s.zip cd contrib\djp\src unzip lzo.zip or pkunzip -d lzo.zip make How to Use? ~~~~~~~~~~~ Simply type: DJP [options] [] Use the -d option to decompress files. Use the -t option to check the integrity of compressed files. Use the -l option to list the compression ratio. Use the -b option to keep backup files. Use the -s option to put the decompressor into the stub. Use the -c option to produce COFF output. Use the -1 option for the fast (and worse) compressor. Use the -q option for quiet mode. Use the -h option for command line help. Use the -i option for software license. Use the -0 option to ignore the default options (see below). You should always use this in Makefiles. can be a stubbed .EXE or a stubless COFF image. You can use wildcards too. Stubbed vs. stubless decompressor ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Since DJP 1.04 there is a new feature: the stubless decompressor. Here are the main differences between the stubbed and the stubless one. Stubbed ------- + simple self check against viruses ñ you can't debug the compressed files :-) (at least not with the standard DJGPP tools) - alters stubinfo: so if some of your (un)compressed files were stubedited, you must stubedit them after the (de)compression again - if you have "symbolic links" to a compressed file, than you have to replace all the links with djpstub.exe. So if you compress grep.exe, then you should replace egrep.exe and fgrep.exe. DJP -s grep.exe copy djpstub.exe egrep.exe stubedit egrep.exe runfile=grep copy djpstub.exe fgrep.exe stubedit fgrep.exe runfile=grep Or you can use DJPLINKS.BAT (it's in the /bin directory). Stubless -------- + works with the PMODE/DJ stub + works with debuggers (but you won't have debug info!!) + no problems with "symbolic links" + doesn't alter stubinfo. Default options ~~~~~~~~~~~~~~~ You can change the default options for DJP 1.07 through an environment variable called DJP_OPTIONS. You can do this with a SET DJP_OPTIONS= statement in your autoexec.bat or via the DJGPP.ENV file. If you choose the latter method, just add a section to your DJGPP.ENV: [djp] DJP_OPTIONS=your favorite options for DJP (-s,-b,-c,-q) For example if you don't like the progress indicator, and always want to keep the backup files, then set DJP_OPTIONS=qb After this, the -q and the -b option will have the opposite meaning if you use them on the command line. -b will delete the backup files, and -q will show the progress indicator. Type DJP -h if you wanna see the actual state of the options (dynamic command line help :-) Legal Issues ~~~~~~~~~~~~ DJP and the LZO package is covered by the GNU General Public License (GPL). The decompressor imbedded in each compressed image contains GPL code written by Laszlo Molnar and Copyright (C) by Markus F.X.J. Oberhumer. Compressed commercial and other images may be distributed by special permission of the authors without source, as long as the decompressor is only used for decompressing the image at program startup. Warranty ~~~~~~~~ #include "as_usual_no_warranty.h" Thanks ~~~~~~ DJ Delorie for DJGPP. Markus F.X.J. Oberhumer for LZO. You can get the full LZO package from: http://wildsau.idv.uni-linz.ac.at/mfx/lzo.html Charles W. Sandmann for the ideas with the stubless decompressor and for the beta testing. Salvador Eduardo Tropea for the beta testing. Contact ~~~~~~~ Laszlo Molnar email: ml1050@cdata.tvnet.hu History ~~~~~~~ 1.07 1998. 04. 20 My email address changed. DJP.C changed : using lzo 1.04 : a little better compression ~~~~~~~~~~~~~~~~~~ 1.06 1997. 11. 24 DJP.C changed : Markus added lzo 1.01 support : a little better compression, a little faster decompression new : support for Allegro pakfiles bug removed: fixed incompability with strip.exe from Binutils 2.8.1 bug removed: fixed temporary filename problem on chinese win0.95. bug removed: fixes for decompressing plain COFF files DJPSTUB.ASM changed : uses stub.asm from djlsr202 ~~~~~~~~~~~~~~~~~~ 1.05 1996. 12. 02 DJP.C new : -1 option for fast compression. new : -l to list the compression ratio (thanks Markus). new : uses the checksum of the uncompressed image changed : uses the LZO1X-999 compressor : better but slower compression, faster decompression changed : always use the safe decompressors changed : built-in stubify bug removed: problem if the entry point of the executable > 0x11ff (as in RHIDE beta 6) bug removed: DJP is DLM aware (hmm.. :-) now DJPSTUB.ASM new : simple self check new : prints an error message if decompression fails changed : uses stub.asm from djlsr201 with #ifdefs changed : uses the decompressor from the lzo distribution ~~~~~~~~~~~~~~~~~~ 1.04 1996. 07. 15 DJPSTUB.ASM changed : LZO1F decompressor new : checksum for integrity checking (Adler32) DJP.C new : -s,-c,-b,-t,-q,-0 options. new : progress indicator changed : using the LZO1F-999 compressor : better but SLOWER compression, faster decompression bug removed: problem with strange .text section size in QUAKE.EXE bug removed: problem with an extra section in the COFF header in UAE.EXE (The Unix Amiga Emulator) LZO1F_D.S new file : LZO1F stubless decompressor in AT&T format. ~~~~~~~~~~~~~~~~~~ 1.03 1996. 05. 28 DJPSTUB.ASM bug removed: problem with loading packed section if size%4 != 0 this was a serious bug, so you should recompress all the files, that were compressed with DJP < 1.03 new : restored error messages changed : the decompressor runs in the 32-bit code segment DJP.C new : adding decompressor new : can compress plain, executable COFF files (inserts stub) new : compression check new : error messages changed : using the LZO1-99 compressor : ~2% better compression ~~~~~~~~~~~~~~~~~~ 1.02 1996. 05. 07 DJP.C bug removed: couldn't rename temporary file in certain cases ~~~~~~~~~~~~~~~~~~ 1.01 1996. 05. 06 DJPSTUB.ASM bug removed: incorrect order of pop es and pop ds DJP.C bug removed: doesn't try to compress already compressed files some minor changes ~~~~~~~~~~~~~~~~~~ 1.00 1996. 04. 27 Original release. EOF ~~~