home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / UTILITY / FILE / DISLT101.ZIP / DISLITE.DOC next >
Encoding:
Text File  |  1992-04-14  |  18.9 KB  |  425 lines

  1.                                     DISLITE
  2.  
  3.                             Executable file expander
  4.  
  5.  
  6.  
  7. CONTENTS
  8.  
  9.          WARRANTY                           TECHS
  10.      COPYING                            MESSAGES
  11.          WHAT                               BUGS
  12.          WHY                                PRICE
  13.          HOW                                SOURCE
  14.          LIMITS                             WHO
  15.  
  16.  
  17.  
  18. WARRANTY
  19.  
  20.    NONE! THIS PROGRAM COMES 'AS IS'. I CANNOT BE HELD RESPONSIBLE FOR
  21.    ANY DAMAGE CAUSED BY THE USE OR MISUSE THIS PROGRAM. I CANNOT
  22.    GUARANTEE THE FITNESS OF THIS PROGRAM FOR ANY PARTICULAR PURPOSE.
  23.    IF THIS PROGRAM TURNS OUT TO BEHAVE UNEXPECTEDLY OR ERRONEOUSLY,
  24.    THE USER IS RESPONSIBLE, AND I CANNOT BE FORCED TO SUPPLY THE USER
  25.    WITH A FIX.
  26.    
  27.    So, now that I have the lawyers off my back (I hope), you can forget
  28.    all that capsed crap above, and read the rest of the manual, in
  29.    which I promise not to shout anymore.
  30.  
  31.  
  32.  
  33. COPYING
  34.  
  35.    You are free to distribute this program, provided that neither the
  36.    program nor this document are changed, and the program and this
  37.    document are kept together. Only a marginal fee may be asked for
  38.    shipment and handling when distributing. You are not allowed to
  39.    sell this program.
  40.  
  41.    Now that the black-market pirates are away too, we can get to business.
  42.  
  43.  
  44.  
  45. WHAT
  46.  
  47.    DISLITE expands all programs compressed by PKLITE (tm) to their
  48.    original image. Expanding your files has many benefits over leaving
  49.    them in their compressed state.
  50.  
  51.    Most important, the uncompressed image can be examined by other
  52.    tools, such as virus scanners. A regular virus scanner can never
  53.    detect a virus embedded in a compressed file (unless by executing
  54.    and checking for suspicious actions), but on the uncompressed image
  55.    a much faster pattern matching algorithm can be used.
  56.    
  57.    Then, PKLITE compressed programs can hardly be compressed any further
  58.    using "regular" file compressors like ARJ, LHA. The uncompressed files
  59.    however, usually compress quite well using these products, and normally
  60.    the result of compressing the original file is better than that
  61.    achieved when first compressing with PKLITE, and then with another
  62.    compression utility. (Though not always)
  63.    
  64.    The same argument usually holds if you are using products like Stacker
  65.    or SpeedStor to enlarge your disk, which could be considered as
  66.    compression utilities on-the-fly. It would be silly to have a second,
  67.    almost useless, compression slowing down your system.
  68.  
  69.    In a similar context can be mentioned that some people prefer other
  70.    executable processors, such as DIET, to recompress the files.
  71.    
  72.    Then there is an increase in execution speed of uncompressed files,
  73.    because the uncompression is no longer needed before execution. This
  74.    may, on the other hand, not be true on fast machines with slow drives.
  75.    In these circumstances the compressed file might actually execute
  76.    quicker because there is less disk access.
  77.    
  78.    Finally, for the compression-hunters, there are a few extra's in this
  79.    program that lets you strip unnecessary information off of the
  80.    executables, making it a tad smaller.
  81.  
  82.  
  83.  
  84. WHY
  85.  
  86.    You could ask why this separate program is necessary, as PKLITE
  87.    has the -x option to "extract" (I'd rather call it uncompress)
  88.    a compressed files.
  89.    
  90.    The answer is simple. There is also an option in the commercial
  91.    version of PKLITE to generate "unextractable" files (-e). Needless
  92.    to say there are numerous programs available nowadays in this
  93.    "unextractable" format. For those of us who don't like PKLITE for
  94.    some reason, this presents a problem!
  95.    
  96.    DISLITE has the capability of expanding these "unextractable" files
  97.    to their original image. Unfortunately some information is lost
  98.    during the compression process of PKLITE, but there is no important
  99.    information missing. See the TECHS section further on to get
  100.    more details on this.
  101.  
  102.  
  103.  
  104. HOW
  105.  
  106.    Usage of DISLITE is very simple. If you type DISLITE without any
  107.    arguments, a short help screen appears to remind you of the proper usage.
  108.    If you specify the name of an executable file, DISLITE will expand that
  109.    executable to its original state (provided it was compressed using
  110.    PKLITE). If you specify two filenames, the second will be treated as
  111.    the destination file, which will contain the decompressed image.
  112.    Note that you do not need to specify the extension of the executables.
  113.    Then there are several options which may occur anywhere on the command
  114.    line.
  115.    
  116.    The official prototype of the command is as follows:
  117.  
  118.       DISLITE [options] [d:][/path]Infile [[d:][/path]Outfile]
  119.  
  120.       Options are:
  121.         -b = make backup .BAK file of original
  122.         -e = extract unextractable file
  123.     -f = fix fixups also on normal compressed files
  124.         -h = remove irrelevant header data
  125.         -o = overwrite output file if it exists
  126.         -p = align text data on a page
  127.         -r = remove overlay data
  128.         -s = silent, do not generate any warnings
  129.         -u = update file time/date to current time/date
  130.         -v = verbose
  131.  
  132.    Options can always be combined, so "-b -v -h" can be abbreviated as
  133.    "-bvh". You can also use the switch character (usually '/', but it
  134.    could be set to anything) as the option indicator. In case you use '/',
  135.    the program tries to be smart and figures out whether you mean a
  136.    filename or indeed an option (since you can use the '/' character as
  137.    a directory separator too). In case of difficulty, use '-' and '\'.
  138.    (More specific: DISLITE will only recognise an option initiated with
  139.    '/' as option if every following character is a valid option.)
  140.    
  141.    A short description of all possible options follows:
  142.    
  143.    -b  This option makes a backup of the compressed file image, which
  144.        has the same name and path as the Infile, but the extension .BAK.
  145.        Any existing file with that name will be overwritten.
  146.  
  147.    -e  This option serves two purposes: First, to annoy Phil Katz, the
  148.        original writer of the (quite good) program PKLITE. Second, to
  149.        allow you more freedom in the creation of profane and filthy
  150.        words with the option letters. To further support you in this,
  151.        double specified options have no addition effect at all. The
  152.        commonly heard rumour that the filthiest, profanest words will
  153.        get you enhanced performance of DISLITE is absolutely untrue.
  154.        This option is further completely ignored by the program.
  155.    
  156.    -f  Use this option if you previously got the "harmless warning: design
  157.        thinko or linker cockup". With this option, DISLITE repairs a
  158.        damaged fixup table in an .EXE file. Note that this is automatic
  159.        on extra compressed files. It is, of course, useless on .COM files.
  160.        See the MESSAGES section for more information on this.
  161.    
  162.    -h  Most linkers include in the exe file header some information that
  163.        is not needed for program execution in any way, information that
  164.        might be used by a debugger later. Use this option to remove that
  165.        information from the executable. (For the technically gifted:
  166.        the information between the end of the documented DOS header, and
  167.        the start of the relocation table. PKLITE ignores all information
  168.        after the relocation table in the header, so that is lost forever
  169.        after using any PKLITE compression method.)
  170.        Note that this option has no effect on .COM files as they have no
  171.        exe header, and neither on extra-compressed files, as the extra
  172.        header data is then removed by PKLITE on compression.
  173.  
  174.    -o  Use this option to overwrite an output file that already exists.
  175.        Note that files with extensions .BAK and .$$$ with the name of
  176.        the Infile are always overwritten (provided these files are
  177.        generated by the program. You normally never see .$$$ but this
  178.        is used as an interim file in case you only specify an Infile).
  179.    
  180.    -p  Align text data on a page. This option can be used for any .EXE
  181.        file, to make the exe header a multiple of 512 bytes. Some say
  182.        that the executable loads faster if this is the case.
  183.    
  184.    -r  Remove any overlay data present. Overlay data is data after the
  185.        executable file image until the physical end of file. DISLITE
  186.        never complains when overlays are present, it normally just copies
  187.        the overlays.
  188.        
  189.    -s  Be silent. No warnings are given, and the header is suppressed
  190.        too. Usefull for background or batch execution.
  191.    
  192.    -u  Update time. Use this option to set the file date/time stamp to
  193.        the current time. Normally, DISLITE leaves the file date/time
  194.        of the file the same (even when you specify an Outfile).
  195.    
  196.    -v  Be verbose. When you use this option, you will get a progress
  197.        indicator, and lots and lots of information about the file
  198.        being uncompressed. Recommended to the nosey.
  199.  
  200.  
  201.  
  202. LIMITS
  203.  
  204.    DISLITE uses quite a lot of memory. I haven't exactly calculated it,
  205.    but I expect you need approximately 150K + the amount the expanded
  206.    program takes to execute. In case you have not enough memory available,
  207.    DISLITE will first try to shrink its buffers a little (upto a certain
  208.    point), but this can lead to errors like "Too many fixups, sorry".
  209.    
  210.    In case anyone ever stumbles upon an executable that has more than
  211.    16384 fixups, DISLITE gives up. I doubt any such file exists. I bet
  212.    DOS gives up before that, because of the .EXE header exceeding 64K.
  213.  
  214.    The program uses the build-in extractor of the executable, and
  215.    therefore a very smart virus can get hold of your system if you
  216.    expand a compressed file which had a virus infecting it after
  217.    compression. But since DISLITE disallows DOS and BIOS access for the
  218.    expanding program, the chances that you actually catch a virus
  219.    that infected a compressed file are much larger. See the TECHS
  220.    section for more info.
  221.    
  222.    The "effective compression" ratio as described under MESSAGES can
  223.    give odd or incorrect results if you specify one of the -hpr
  224.    options.
  225.    
  226.    I haven't really tried to turn DISLITE into a speed demon. Especially
  227.    the part where the resulting executable is written could be a little
  228.    faster. That probably requires quite a thorough rewrite, though.
  229.  
  230.  
  231.  
  232. TECHS
  233.  
  234.    As said in the previous section, DISLITE uses the extractor build
  235.    into the compressed file to decompress it. There is a little
  236.    debugger inside DISLITE that allows it to only execute the build-in
  237.    decompressor and extract information from it at the same time.
  238.    Because of this, DISLITE is likely to work with future versions of
  239.    PKLITE also, in case a slightly different encoding scheme is used.
  240.    Currently DISLITE has been thoroughly tested with PKLITE versions
  241.    upto 1.13, but it also works for the PKLITE 1.20 compressed files
  242.    I could lay my hands on.
  243.    
  244.    When debugging the program that is decompressed, DOS and BIOS
  245.    interrupts are disabled. But in case such an interrupt is called
  246.    anyway, DISLITE displays the offending interrupt number and follows
  247.    with a dump of all internal registers. This might indicate several
  248.    things: If you had previous warnings about an unrecognised PKLITE
  249.    version, that is likely to be cause of the troubles. If you
  250.    haven't, someone might have modified the compressed program.
  251.    This modification could have been done by the original programmer
  252.    on purpose, or, as a final case, by a virus.
  253.    
  254.    .COM files are always extracted to their original image, and so are
  255.    normal compressed .EXE files. (Well, at least restored just as
  256.    PKLITE -x would restore them. If there was any information stored
  257.    after the relocation table, that is lost.)
  258.  
  259.    Extra compressed .EXE files can not be restored to their original
  260.    image exactly. As said before, the information stored in the header
  261.    just after the DOS documented .EXE header and before the relocation
  262.    table cannot be recovered. This information is not needed anyway.
  263.    Further, there are 3 entries in the .EXE header that can not be
  264.    recovered completely. Two of these, the headersize and the position
  265.    of the relocation table follow from the fact that the additional
  266.    header data is lost.
  267.    
  268.    The third entry that can not be completely recovered is the minimum
  269.    memory to allocate to the program. This value might be a little bigger
  270.    in the newly extracted image as compared to the original one. In case
  271.    you have such a critical memory setup that the program cannot execute
  272.    with this larger minimum memory requirement, it wouldn't have done so
  273.    *with* the PKLITE decompression code either. Resuming, this is again not
  274.    a great loss.
  275.    
  276.    However, DISLITE is very well able to *completely* restore the relocation
  277.    or fixup table. In fact DISLITE goes through some trouble finding the
  278.    right segment for each fixup, as PKLITE -e kindly throws that information
  279.    away.
  280.  
  281.  
  282.  
  283. MESSAGES
  284.  
  285.    Many! DISLITE is stuffed to under its chin with all kinds of information
  286.    messages, most of which are self-explanatory. I will, however, name
  287.    some.
  288.    
  289.    There are four types of messages DISLITE can produce: informational,
  290.    harmless warnings, warnings, and errors.
  291.    
  292.    Informational messages are enabled with the -v option. They include:
  293.    progress indicators, and various file information. There are two
  294.    compression ratio's mentioned for .EXE files: the real compression and
  295.    the effective compression. The real compression is the compression of
  296.    text (executable) data, as achieved by the PKLITE algorithms, and the
  297.    effective compression is the file-to-file overall compression factor,
  298.    the one that PKLITE displays. This latter value might not be correct
  299.    in all circumstances. See the LIMITS section.
  300.    
  301.  
  302.    There are only two harmless warnings (and turned off with -s):
  303.    
  304.       Harmless warning: design thinko or linker cockup.
  305.       Fixup XXXX:XXXX out of segment (should be in XXXX)
  306.       ...
  307.       
  308.    This can only occur if you are extracting a normal compressed .EXE
  309.    file. It means that DISLITE found a fixup to be incorrectly
  310.    specified in the wrong segment. No harm is done, however, since the
  311.    fixup is applied to the same file location nevertheless. This either
  312.    means that there is a major design flaw in DISLITE or, more probably,
  313.    some linker (or other expander software) has made an error. This is
  314.    likely to happen if you expand a file that has previously been
  315.    compressed with LZEXE, uncompressed with an old version of UNLZEXE,
  316.    and then immediately compressed with PKLITE again, without using
  317.    HDROPT first. (Newer versions of PKLITE have HDROPT build in, though).
  318.    
  319.    What this effectively means is, that if this would have been an extra
  320.    compressed file, DISLITE would have rebuild it in a different way.
  321.    If your esteem of aesthetics is high, and you can not tolerate such
  322.    faulty fixups in your files, you should apply the -f option. This will
  323.    cause DISLITE to fix the fixups for you.
  324.    
  325.    The other harmless warning reports that a relative segment in the .EXE
  326.    is ignored. Not likely to happen.
  327.    
  328.    The program will complete like nothing happened after a harmless warning.
  329.    
  330.  
  331.    Warnings are given if you try to expand a program that has no executable
  332.    extension, if you are expanding a program that has an .EXE extension but
  333.    is in fact a .COM file or vice versa, if you are expanding a program
  334.    that was compressed with an unknown version of PKLITE (pre 1.03 or post
  335.    1.20), or if the program has unknown internal PKLITE flags set.
  336.  
  337.    You are asked to confirm before proceeding. Again, setting -s turns this
  338.    all off.
  339.    
  340.    A warning that doesn't ask for permission before proceeding, is the
  341.    one generated when DISLITE detects incorrect original header data in a
  342.    normal compressed .EXE file. DISLITE just assumes it is an extra
  343.    compressed .EXE file, calculates the header on its own, and proceeds.
  344.    You can no longer fool DISLITE by resetting the "extra" flag bit on an
  345.    extra compressed file.
  346.  
  347.  
  348.    There are innumerable errors, mostly DOS errors of the format
  349.    "short explanation:DOS error description". These are all of the type
  350.    "get your dirty hands off that disk drive door and retry". DISLITE
  351.    can't do much about it.
  352.  
  353.    There are some DISLITE specific errors, like "Cannot find end of
  354.    decode loop."; or "Unexpected interrupt xxh from processed program.",
  355.    followed by a dump of all CPU registers; or "Not enough memory." or
  356.    "Too many fixups, sorry."
  357.  
  358.    This all means that DISLITE can no longer keep track of what's happening,
  359.    and gives up. Increasing the memory available to DISLITE might help.
  360.    If it doesn't, blame PKWARE for bringing out an incompatible version of
  361.    PKLITE. (And start looking for an updated DISLITE :-)
  362.    
  363.    The only likely error is that of an unexpected exit from the compressed
  364.    program, which normally means you pressed Ctrl-Break.
  365.  
  366.    You cannot turn off the errors or stop them from aborting the program.
  367.  
  368.  
  369.  
  370. BUGS
  371.  
  372.    Just one, but I can't find it. ;-(
  373.    In case you do, please notify me (see the WHO section below).
  374.  
  375.  
  376.  
  377. PRICE
  378.  
  379.    Zero. Give this away to all your friends, especially if their initials
  380.    are PK ;-) But of course donations are greatly appreciated. See the
  381.    WHO section below to know where to send your money.
  382.  
  383.  
  384.  
  385. SOURCE
  386.  
  387.    Might be messy. I've written the lot using Borland C++ 2.0. The main
  388.    routines are in C, but the taskswitching routines for the debugger are
  389.    all in assembly. Now that it's finished I realise how it all Should Have
  390.    Been Done (tm), but it's too late for that now, I guess.
  391.    
  392.    If you want to take a look at the source, it is available, but not for
  393.    free. If you think you can learn something from this source then I
  394.    can *certainly* make you think that you should pay me before I hand out
  395.    that source.
  396.    
  397.    The price is HFL 25,- DM 25,- or AM$ 20 (Yes, the Germans are screwed
  398.    by this, sorry...). See the WHO section below to find out where you
  399.    should sent your payment too. Please include an internet E-mail or
  400.    FidoNet address where I can send the source to. If you don't, include
  401.    a self-addressed envelope. Specify how you want to receive the source:
  402.    diskette or paper. Yes, I pay for the shipment & handling. And for
  403.    the diskette, if any.
  404.  
  405.  
  406.  
  407. WHO
  408.  
  409.    I can be reached:
  410.    
  411.       Jan-Pieter Cornet
  412.       Aletta Jacobsstraat 8
  413.       2642 AD  Pijnacker
  414.       Netherlands
  415.       phone: +31 1736 98480
  416.       Email: cornet@duteca.et.tudelft.nl
  417.           or ba132@cleveland.freenet.edu
  418.  
  419.       Dutch Bank: ABN Bank Delft, 562217320, tnv. J.P.M. Cornet
  420.       Dutch Giro: 1444902, tnv. J.P.M. Cornet, Pijnacker
  421.  
  422.  
  423.    DISLITE (pd)   Executable File Expander   Version 1.01   14-04-92
  424.    Written 1991-1992 JohnPC.   No rights reserved.   Blatant bending
  425.