home *** CD-ROM | disk | FTP | other *** search
- DISLITE
-
- Executable file expander
-
-
-
- CONTENTS
-
- WARRANTY TECHS
- COPYING MESSAGES
- WHAT BUGS
- WHY PRICE
- HOW SOURCE
- LIMITS WHO
-
-
-
- WARRANTY
-
- NONE! THIS PROGRAM COMES 'AS IS'. I CANNOT BE HELD RESPONSIBLE FOR
- ANY DAMAGE CAUSED BY THE USE OR MISUSE THIS PROGRAM. I CANNOT
- GUARANTEE THE FITNESS OF THIS PROGRAM FOR ANY PARTICULAR PURPOSE.
- IF THIS PROGRAM TURNS OUT TO BEHAVE UNEXPECTEDLY OR ERRONEOUSLY,
- THE USER IS RESPONSIBLE, AND I CANNOT BE FORCED TO SUPPLY THE USER
- WITH A FIX.
-
- So, now that I have the lawyers off my back (I hope), you can forget
- all that capsed crap above, and read the rest of the manual, in
- which I promise not to shout anymore.
-
-
-
- COPYING
-
- You are free to distribute this program, provided that neither the
- program nor this document are changed, and the program and this
- document are kept together. Only a marginal fee may be asked for
- shipment and handling when distributing. You are not allowed to
- sell this program.
-
- Now that the black-market pirates are away too, we can get to business.
-
-
-
- WHAT
-
- DISLITE expands all programs compressed by PKLITE (tm) to their
- original image. Expanding your files has many benefits over leaving
- them in their compressed state.
-
- Most important, the uncompressed image can be examined by other
- tools, such as virus scanners. A regular virus scanner can never
- detect a virus embedded in a compressed file (unless by executing
- and checking for suspicious actions), but on the uncompressed image
- a much faster pattern matching algorithm can be used.
-
- Then, PKLITE compressed programs can hardly be compressed any further
- using "regular" file compressors like ARJ, LHA. The uncompressed files
- however, usually compress quite well using these products, and normally
- the result of compressing the original file is better than that
- achieved when first compressing with PKLITE, and then with another
- compression utility. (Though not always)
-
- The same argument usually holds if you are using products like Stacker
- or SpeedStor to enlarge your disk, which could be considered as
- compression utilities on-the-fly. It would be silly to have a second,
- almost useless, compression slowing down your system.
-
- In a similar context can be mentioned that some people prefer other
- executable processors, such as DIET, to recompress the files.
-
- Then there is an increase in execution speed of uncompressed files,
- because the uncompression is no longer needed before execution. This
- may, on the other hand, not be true on fast machines with slow drives.
- In these circumstances the compressed file might actually execute
- quicker because there is less disk access.
-
- Finally, for the compression-hunters, there are a few extra's in this
- program that lets you strip unnecessary information off of the
- executables, making it a tad smaller.
-
-
-
- WHY
-
- You could ask why this separate program is necessary, as PKLITE
- has the -x option to "extract" (I'd rather call it uncompress)
- a compressed files.
-
- The answer is simple. There is also an option in the commercial
- version of PKLITE to generate "unextractable" files (-e). Needless
- to say there are numerous programs available nowadays in this
- "unextractable" format. For those of us who don't like PKLITE for
- some reason, this presents a problem!
-
- DISLITE has the capability of expanding these "unextractable" files
- to their original image. Unfortunately some information is lost
- during the compression process of PKLITE, but there is no important
- information missing. See the TECHS section further on to get
- more details on this.
-
-
-
- HOW
-
- Usage of DISLITE is very simple. If you type DISLITE without any
- arguments, a short help screen appears to remind you of the proper usage.
- If you specify the name of an executable file, DISLITE will expand that
- executable to its original state (provided it was compressed using
- PKLITE). If you specify two filenames, the second will be treated as
- the destination file, which will contain the decompressed image.
- Note that you do not need to specify the extension of the executables.
- Then there are several options which may occur anywhere on the command
- line.
-
- The official prototype of the command is as follows:
-
- DISLITE [options] [d:][/path]Infile [[d:][/path]Outfile]
-
- Options are:
- -b = make backup .BAK file of original
- -e = extract unextractable file
- -f = fix fixups also on normal compressed files
- -h = remove irrelevant header data
- -o = overwrite output file if it exists
- -p = align text data on a page
- -r = remove overlay data
- -s = silent, do not generate any warnings
- -u = update file time/date to current time/date
- -v = verbose
-
- Options can always be combined, so "-b -v -h" can be abbreviated as
- "-bvh". You can also use the switch character (usually '/', but it
- could be set to anything) as the option indicator. In case you use '/',
- the program tries to be smart and figures out whether you mean a
- filename or indeed an option (since you can use the '/' character as
- a directory separator too). In case of difficulty, use '-' and '\'.
- (More specific: DISLITE will only recognise an option initiated with
- '/' as option if every following character is a valid option.)
-
- A short description of all possible options follows:
-
- -b This option makes a backup of the compressed file image, which
- has the same name and path as the Infile, but the extension .BAK.
- Any existing file with that name will be overwritten.
-
- -e This option serves two purposes: First, to annoy Phil Katz, the
- original writer of the (quite good) program PKLITE. Second, to
- allow you more freedom in the creation of profane and filthy
- words with the option letters. To further support you in this,
- double specified options have no addition effect at all. The
- commonly heard rumour that the filthiest, profanest words will
- get you enhanced performance of DISLITE is absolutely untrue.
- This option is further completely ignored by the program.
-
- -f Use this option if you previously got the "harmless warning: design
- thinko or linker cockup". With this option, DISLITE repairs a
- damaged fixup table in an .EXE file. Note that this is automatic
- on extra compressed files. It is, of course, useless on .COM files.
- See the MESSAGES section for more information on this.
-
- -h Most linkers include in the exe file header some information that
- is not needed for program execution in any way, information that
- might be used by a debugger later. Use this option to remove that
- information from the executable. (For the technically gifted:
- the information between the end of the documented DOS header, and
- the start of the relocation table. PKLITE ignores all information
- after the relocation table in the header, so that is lost forever
- after using any PKLITE compression method.)
- Note that this option has no effect on .COM files as they have no
- exe header, and neither on extra-compressed files, as the extra
- header data is then removed by PKLITE on compression.
-
- -o Use this option to overwrite an output file that already exists.
- Note that files with extensions .BAK and .$$$ with the name of
- the Infile are always overwritten (provided these files are
- generated by the program. You normally never see .$$$ but this
- is used as an interim file in case you only specify an Infile).
-
- -p Align text data on a page. This option can be used for any .EXE
- file, to make the exe header a multiple of 512 bytes. Some say
- that the executable loads faster if this is the case.
-
- -r Remove any overlay data present. Overlay data is data after the
- executable file image until the physical end of file. DISLITE
- never complains when overlays are present, it normally just copies
- the overlays.
-
- -s Be silent. No warnings are given, and the header is suppressed
- too. Usefull for background or batch execution.
-
- -u Update time. Use this option to set the file date/time stamp to
- the current time. Normally, DISLITE leaves the file date/time
- of the file the same (even when you specify an Outfile).
-
- -v Be verbose. When you use this option, you will get a progress
- indicator, and lots and lots of information about the file
- being uncompressed. Recommended to the nosey.
-
-
-
- LIMITS
-
- DISLITE uses quite a lot of memory. I haven't exactly calculated it,
- but I expect you need approximately 150K + the amount the expanded
- program takes to execute. In case you have not enough memory available,
- DISLITE will first try to shrink its buffers a little (upto a certain
- point), but this can lead to errors like "Too many fixups, sorry".
-
- In case anyone ever stumbles upon an executable that has more than
- 16384 fixups, DISLITE gives up. I doubt any such file exists. I bet
- DOS gives up before that, because of the .EXE header exceeding 64K.
-
- The program uses the build-in extractor of the executable, and
- therefore a very smart virus can get hold of your system if you
- expand a compressed file which had a virus infecting it after
- compression. But since DISLITE disallows DOS and BIOS access for the
- expanding program, the chances that you actually catch a virus
- that infected a compressed file are much larger. See the TECHS
- section for more info.
-
- The "effective compression" ratio as described under MESSAGES can
- give odd or incorrect results if you specify one of the -hpr
- options.
-
- I haven't really tried to turn DISLITE into a speed demon. Especially
- the part where the resulting executable is written could be a little
- faster. That probably requires quite a thorough rewrite, though.
-
-
-
- TECHS
-
- As said in the previous section, DISLITE uses the extractor build
- into the compressed file to decompress it. There is a little
- debugger inside DISLITE that allows it to only execute the build-in
- decompressor and extract information from it at the same time.
- Because of this, DISLITE is likely to work with future versions of
- PKLITE also, in case a slightly different encoding scheme is used.
- Currently DISLITE has been thoroughly tested with PKLITE versions
- upto 1.13, but it also works for the PKLITE 1.20 compressed files
- I could lay my hands on.
-
- When debugging the program that is decompressed, DOS and BIOS
- interrupts are disabled. But in case such an interrupt is called
- anyway, DISLITE displays the offending interrupt number and follows
- with a dump of all internal registers. This might indicate several
- things: If you had previous warnings about an unrecognised PKLITE
- version, that is likely to be cause of the troubles. If you
- haven't, someone might have modified the compressed program.
- This modification could have been done by the original programmer
- on purpose, or, as a final case, by a virus.
-
- .COM files are always extracted to their original image, and so are
- normal compressed .EXE files. (Well, at least restored just as
- PKLITE -x would restore them. If there was any information stored
- after the relocation table, that is lost.)
-
- Extra compressed .EXE files can not be restored to their original
- image exactly. As said before, the information stored in the header
- just after the DOS documented .EXE header and before the relocation
- table cannot be recovered. This information is not needed anyway.
- Further, there are 3 entries in the .EXE header that can not be
- recovered completely. Two of these, the headersize and the position
- of the relocation table follow from the fact that the additional
- header data is lost.
-
- The third entry that can not be completely recovered is the minimum
- memory to allocate to the program. This value might be a little bigger
- in the newly extracted image as compared to the original one. In case
- you have such a critical memory setup that the program cannot execute
- with this larger minimum memory requirement, it wouldn't have done so
- *with* the PKLITE decompression code either. Resuming, this is again not
- a great loss.
-
- However, DISLITE is very well able to *completely* restore the relocation
- or fixup table. In fact DISLITE goes through some trouble finding the
- right segment for each fixup, as PKLITE -e kindly throws that information
- away.
-
-
-
- MESSAGES
-
- Many! DISLITE is stuffed to under its chin with all kinds of information
- messages, most of which are self-explanatory. I will, however, name
- some.
-
- There are four types of messages DISLITE can produce: informational,
- harmless warnings, warnings, and errors.
-
- Informational messages are enabled with the -v option. They include:
- progress indicators, and various file information. There are two
- compression ratio's mentioned for .EXE files: the real compression and
- the effective compression. The real compression is the compression of
- text (executable) data, as achieved by the PKLITE algorithms, and the
- effective compression is the file-to-file overall compression factor,
- the one that PKLITE displays. This latter value might not be correct
- in all circumstances. See the LIMITS section.
-
-
- There are only two harmless warnings (and turned off with -s):
-
- Harmless warning: design thinko or linker cockup.
- Fixup XXXX:XXXX out of segment (should be in XXXX)
- ...
-
- This can only occur if you are extracting a normal compressed .EXE
- file. It means that DISLITE found a fixup to be incorrectly
- specified in the wrong segment. No harm is done, however, since the
- fixup is applied to the same file location nevertheless. This either
- means that there is a major design flaw in DISLITE or, more probably,
- some linker (or other expander software) has made an error. This is
- likely to happen if you expand a file that has previously been
- compressed with LZEXE, uncompressed with an old version of UNLZEXE,
- and then immediately compressed with PKLITE again, without using
- HDROPT first. (Newer versions of PKLITE have HDROPT build in, though).
-
- What this effectively means is, that if this would have been an extra
- compressed file, DISLITE would have rebuild it in a different way.
- If your esteem of aesthetics is high, and you can not tolerate such
- faulty fixups in your files, you should apply the -f option. This will
- cause DISLITE to fix the fixups for you.
-
- The other harmless warning reports that a relative segment in the .EXE
- is ignored. Not likely to happen.
-
- The program will complete like nothing happened after a harmless warning.
-
-
- Warnings are given if you try to expand a program that has no executable
- extension, if you are expanding a program that has an .EXE extension but
- is in fact a .COM file or vice versa, if you are expanding a program
- that was compressed with an unknown version of PKLITE (pre 1.03 or post
- 1.20), or if the program has unknown internal PKLITE flags set.
-
- You are asked to confirm before proceeding. Again, setting -s turns this
- all off.
-
- A warning that doesn't ask for permission before proceeding, is the
- one generated when DISLITE detects incorrect original header data in a
- normal compressed .EXE file. DISLITE just assumes it is an extra
- compressed .EXE file, calculates the header on its own, and proceeds.
- You can no longer fool DISLITE by resetting the "extra" flag bit on an
- extra compressed file.
-
-
- There are innumerable errors, mostly DOS errors of the format
- "short explanation:DOS error description". These are all of the type
- "get your dirty hands off that disk drive door and retry". DISLITE
- can't do much about it.
-
- There are some DISLITE specific errors, like "Cannot find end of
- decode loop."; or "Unexpected interrupt xxh from processed program.",
- followed by a dump of all CPU registers; or "Not enough memory." or
- "Too many fixups, sorry."
-
- This all means that DISLITE can no longer keep track of what's happening,
- and gives up. Increasing the memory available to DISLITE might help.
- If it doesn't, blame PKWARE for bringing out an incompatible version of
- PKLITE. (And start looking for an updated DISLITE :-)
-
- The only likely error is that of an unexpected exit from the compressed
- program, which normally means you pressed Ctrl-Break.
-
- You cannot turn off the errors or stop them from aborting the program.
-
-
-
- BUGS
-
- Just one, but I can't find it. ;-(
- In case you do, please notify me (see the WHO section below).
-
-
-
- PRICE
-
- Zero. Give this away to all your friends, especially if their initials
- are PK ;-) But of course donations are greatly appreciated. See the
- WHO section below to know where to send your money.
-
-
-
- SOURCE
-
- Might be messy. I've written the lot using Borland C++ 2.0. The main
- routines are in C, but the taskswitching routines for the debugger are
- all in assembly. Now that it's finished I realise how it all Should Have
- Been Done (tm), but it's too late for that now, I guess.
-
- If you want to take a look at the source, it is available, but not for
- free. If you think you can learn something from this source then I
- can *certainly* make you think that you should pay me before I hand out
- that source.
-
- The price is HFL 25,- DM 25,- or AM$ 20 (Yes, the Germans are screwed
- by this, sorry...). See the WHO section below to find out where you
- should sent your payment too. Please include an internet E-mail or
- FidoNet address where I can send the source to. If you don't, include
- a self-addressed envelope. Specify how you want to receive the source:
- diskette or paper. Yes, I pay for the shipment & handling. And for
- the diskette, if any.
-
-
-
- WHO
-
- I can be reached:
-
- Jan-Pieter Cornet
- Aletta Jacobsstraat 8
- 2642 AD Pijnacker
- Netherlands
- phone: +31 1736 98480
- Email: cornet@duteca.et.tudelft.nl
- or ba132@cleveland.freenet.edu
-
- Dutch Bank: ABN Bank Delft, 562217320, tnv. J.P.M. Cornet
- Dutch Giro: 1444902, tnv. J.P.M. Cornet, Pijnacker
-
-
- DISLITE (pd) Executable File Expander Version 1.01 14-04-92
- Written 1991-1992 JohnPC. No rights reserved. Blatant bending