home *** CD-ROM | disk | FTP | other *** search
/ TopWare Tools / TOOLS.iso / tools / top1455 / manual.cpk < prev    next >
Encoding:
Text File  |  1991-11-15  |  45.8 KB  |  1,073 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.                                    COMPACK 4.5
  12.                          DOD Program Compaction Software
  13.  
  14.                                    USER MANUAL
  15.  
  16.  
  17.                                     CONTENTS
  18.                                     ________
  19.                                                                   Page
  20.              Installation...........................................1
  21.              Distribution...........................................1
  22.              Getting Started........................................1
  23.              Rationale..............................................2
  24.              How COMPACK works......................................3
  25.              Real Time Environment..................................3
  26.              Some typical compression statistics....................4
  27.              COMPACK Syntax.........................................4
  28.              Command Line Options...................................5
  29.              Examples...............................................6
  30.              Hardware and Software Requirements.....................6
  31.              COMPACK Error Messages.................................6
  32.              COMPACK Warning Messages...............................7
  33.              Optimising COMPACK.....................................7
  34.              Compacting BIOS Files..................................8
  35.              Problem Cases..........................................8
  36.              Known Anomalies........................................9
  37.              Answers to some common questions about COMPACK.........10
  38.              COM2EXE - Multi-Segment COM to EXE Converter...........12
  39.              COM2EXE Syntax.........................................12
  40.              Example Use............................................12
  41.              BUILDSFX - Self Extracting Program Creator.............13
  42.              BUILDSFX Syntax........................................13
  43.              Example Use............................................13
  44.              Execution of the SFX...................................14
  45.              Using SFX programs on Single Diskette Systems..........14
  46.              Minimising SFX Disk Size...............................14
  47.              Sample Commercial Use Licence..........................15
  48.  
  49.  
  50.                                   INSTALLATION
  51.                                   ____________
  52.  
  53.         COMPACK  is  supplied as a self extracting file (created  by  our
  54.         utility  program  BUILDSFX).  To install the  software  select  a
  55.         suitable  directory  as  the  default  and  execute  the  program
  56.         CPK45.EXE.   This will automatically create all the files in  the
  57.         current directory (overwriting any files with the same name). (If
  58.         you wish to extract files on a one diskette drive system, you may
  59.         change diskettes after the opening prompt).  Be sure to read  the
  60.         file README.
  61.                                 14 November 1991
  62.  
  63.  
  64.                         Prominence Computer Services Ltd.
  65.         Strada  Sottopiazzo  18,  14056 Boglietto  di  Costigliole  (AT),
  66.         Italy.
  67.                               Fax. +39 (11) 9574117
  68.  
  69.  
  70.             Copyright (C) Prominence Computer Services Ltd. 1990,1991
  71.  
  72.  
  73.  
  74.  
  75.         COMPACK 4.5 User Manual                               Page 2
  76.  
  77.  
  78.                                   DISTRIBUTION
  79.                                   ____________
  80.  
  81.         COMPACK  and BUILDSFX are the copyrighted property of  Prominence
  82.         Computer  Services  Ltd., and are distributed as  Shareware.   As
  83.         such,  you  are  free  to  use and  copy  the  software  for  non
  84.         commercial  purposes.  The software may not be modified.  If  you
  85.         find   the  programs  generated  are  small  and  fast,  then   a
  86.         contribution of US $25 would be appreciated.  If you send $40  or
  87.         more  you  become a registered user and will be sent  the  latest
  88.         version of COMPACK with printed manual.
  89.  
  90.         If  you  use  COMPACK  or COMPACKted  programs  in  a  commercial
  91.         environment or government institution registration is obligatory.
  92.         Commercial distribution of COMPACKted programs requires a written
  93.         agreement (not required for compaction of public domain  software
  94.         or shareware so long as credits are given in the documentation or
  95.         program).   Commercial  users  wishing  to  distribute   programs
  96.         compressed  by  COMPACK  or BUILDSFX  should  contact  Prominence
  97.         Computer  Services Ltd. for further details.  A sample  agreement
  98.         is appended to this manual.
  99.  
  100.         In Italy COMPACK is available from Polimatica SRL, Corso  Francia
  101.         233  A,  10098  Cascine Vica, Rivoli (TO).   Tel  011-9597222  (3
  102.         lines).  FAX +39 (11) 9574117.
  103.  
  104.  
  105.                                  GETTING STARTED
  106.                                  _______________
  107.  
  108.         COMPACK transforms your DOS programs, both EXE and COM files,  to
  109.         load  faster and take up less space on disk!  You don't  need  to
  110.         read this manual to start using COMPACK.  Like all good software,
  111.         COMPACK  comes with help already built in.  Just enter  "COMPACK"
  112.         at  the  DOS  prompt for a summary of the  syntax  and  available
  113.         options.  The rest of this manual is really only for reference.
  114.  
  115.  
  116.                                     RATIONALE
  117.                                     _________
  118.  
  119.         Hard disk are always too small, modem bills too high, and network
  120.         response  time too slow.  The classic solution to these  problems
  121.         has  been to compress the data prior to transmission  or  backup.
  122.         There  are a number of archive utilities to compress  files  into
  123.         "LBR, "ZOO", "ZIP", "ARC", "PAK", "LZH" and similar  incompatible
  124.         formats.
  125.  
  126.         These  utilities work fine when the objective is archiving.   But
  127.         access  to  data, (ie running a program) requires  an  additional
  128.         decompression  utility  and this adds delay and  complexity.   In
  129.         order  to  hide this complexity many  software  distributors  are
  130.         obliged   to  create  bulky  installation  procedures,   somewhat
  131.         counter-productive  when  the aim is to reduce media  costs.   In
  132.         fact  most  archive  expanders  are  not  suitable  for  software
  133.         distribution.  Firstly the expansion program itself takes up tens
  134.         of thousands of bytes of overhead.  Secondly file compression  is
  135.         compromised  by  the  need to  maintain  the  archive  updatable.
  136.         Neither  of these "features" is of any use to the  poor  computer
  137.         user  who  simply wants to use his software with the  minimum  of
  138.         expense and delay.
  139.  
  140.  
  141.             Copyright (C) Prominence Computer Services Ltd. 1990,1991
  142.  
  143.  
  144.  
  145.  
  146.         COMPACK 4.5 User Manual                               Page 3
  147.  
  148.  
  149.         COMPACK  therefore is not an archiving program.  It is a  utility
  150.         which  simply compresses DOS programs.  The  compressed  programs
  151.         will run the same as before without the use of any extra software
  152.         or  hardware.   This is an important advantage because  it  means
  153.         that  compressed software is portable.  There is no risk  that  a
  154.         program  will  not  run  because  an  essential  utility  is  not
  155.         available.   Unlike other software,  the expansion code does  not
  156.         disable  interrupts  for extensive periods (less than  10uS)  and
  157.         consequently  compacted  programs work correctly even in  a  real
  158.         time  environment (such as a network).  Furthermore  no  messages
  159.         are  embedded  in the code so foreign language  programs  can  be
  160.         compressed without problems.
  161.  
  162.         With  few exceptions COMPACK will compress programs smaller  than
  163.         the  very  best  archive utilities.   As  for  speed,  COMPACKted
  164.         programs  actually load faster!  COMPACKted programs  running  on
  165.         floppy  disk, CD-ROM, or over networks will typically respond  in
  166.         half the time of their bulky predecessors.  At the other extreme,
  167.         on  a  fast  RAM  disk, there may be  a  small  additional  delay
  168.         (perhaps  up to a few tenths of a second).  Of course such  delay
  169.         is  barely perceptible and is compensated by the ability  to  fit
  170.         even more data in the RAM disk.
  171.  
  172.  
  173.                                 HOW COMPACK WORKS
  174.                                 _________________
  175.  
  176.         In  simple  terms,  COMPACK  compresses  the  input  program  and
  177.         sandwiches the result between header and trailer code.  Under DOS
  178.         3.X and later the input file is opened DENY_WRITE preventing  any
  179.         other  process (including COMPACK itself or other network  users)
  180.         from overwriting.  Note that your operating system may not  offer
  181.         this protection unless SHARE is loaded.
  182.  
  183.         The  extra header and trailer code amounts to just a few  hundred
  184.         bytes  and is responsible for recreating the exact image  of  the
  185.         uncompressed  program  and passing control to it.   The  code  to
  186.         expand  COM files is smaller and faster than the code  to  expand
  187.         EXE  files.  The compression algorithm is based on  Lempel  Ziv's
  188.         first  proposal, a sliding window algorithm.  (This algorithm  is
  189.         quite  distinct  from their second proposal, also  known  as  the
  190.         Lempel Ziv Welch algorithm.)
  191.  
  192.         COMPACK  replaces repeated byte strings by shorter references  to
  193.         previous   identical  strings.  This  is  called   substitutional
  194.         compression  (as opposed to statistical compression).   There  is
  195.         nothing  very  original in this, almost all  modern  software  or
  196.         hardware compressors in the past few years have used a  variation
  197.         on  this basic method.  Common variations include a second  phase
  198.         of  statistical  compression  whereby  frequent  references   are
  199.         encoded  in  fewer  bits than less  frequent  ones.   Statistical
  200.         compressors  have been applied successfully, for example, in  the
  201.         Huffman  encoding  of LZH archives (hence the name)  and  Shannon
  202.         Fano encoding of ZIP archives.
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.             Copyright (C) Prominence Computer Services Ltd. 1990,1991
  211.  
  212.  
  213.  
  214.  
  215.         COMPACK 4.5 User Manual                               Page 4
  216.  
  217.  
  218.         Combined  with  the  prior phase  of  Lempel  Ziv  substitutional
  219.         compression,  these techniques achieve excellent compression  but
  220.         are  not suitable for compressing programs for  several  reasons.
  221.         Firstly the expansion algorithms are relatively complex, adding a
  222.         significant amount of overhead.  Secondly the algorithms tend  to
  223.         be slow.  Thirdly memory requirements tend to be high, and  there
  224.         simply may not be sufficient room in memory for both tables and a
  225.         large  program simultaneously.  It would certainly be a  pity  if
  226.         large  programs,  which have the most to gain  from  compression,
  227.         could not be expanded again!
  228.  
  229.         COMPACK  manages  to avoid these  disadvantages  whilst  actually
  230.         achieving even greater compression.  There is no second phase  of
  231.         statistical   compression.  Memory  requirements  are   minimised
  232.         because there are no tables.  The simplified expansion code takes
  233.         up  just a few hundred bytes adding very little overhead  to  the
  234.         COMPACKted  program.   Simplicity implies speed:   the  expansion
  235.         code executes between 3 and 20 times faster than similar  archive
  236.         utilities.    Disadvantages?   Well,  to  achieve  the   superior
  237.         compression COMPACK analyses the program to be compressed in very
  238.         considerable  detail, and this takes time.  We feel it  is  worth
  239.         investing  this  time  once and recouping  the  speed  and  space
  240.         savings whenever the program is run.
  241.  
  242.  
  243.         Real Time Environment
  244.  
  245.         Many PC applications are finding their way into networks,  multi-
  246.         tasking   platforms  and  real  time  applications.    In   these
  247.         environments   a   program  which  disables  interrupts   for   a
  248.         significant  amount  of  time is  considered  ill  behaved.   For
  249.         example,   disabling   interrupts   could   cause   a    resident
  250.         communication  program  to lose a character,  (and  probably  the
  251.         entire packet).  If you are already having problems of this  kind
  252.         with  programs compressed by other utilities, COMPACK may be  the
  253.         answer.    COMPACKted  programs  have  no  additional   interrupt
  254.         latency.
  255.  
  256.  
  257.               Some typical compression statistics using COMPACK 4.5
  258.               _____________________________________________________
  259.  
  260.                            Original      Compacted    Reduction
  261.                              Size          Size          %
  262.  
  263.              CYCLONE.COM     5632          3644         35
  264.              COPYWRIT.COM   34784         17534         50
  265.              TCC.EXE       179917         85292         52
  266.              TC.EXE        290249        156876         46
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.             Copyright (C) Prominence Computer Services Ltd. 1990,1991
  280.  
  281.  
  282.  
  283.  
  284.         COMPACK 4.5 User Manual                               Page 5
  285.  
  286.  
  287.                   COMPACK - COM and EXE File Compacter program
  288.                   ____________________________________________
  289.  
  290.         SYNTAX
  291.         ______
  292.  
  293.              COMPACK  \path\program.in \path\program.out [msg] [-options]
  294.  
  295.         Note that the filename must be unambiguous (no '*' nor '?').  The
  296.         third  parameter  is  an  optional  message  which  is  appended,
  297.         uncompressed,  to  the  output program.  This might  be  used  to
  298.         include  a  serial  number and or  copyright  notice.   Copyright
  299.         notices   embedded  in  the  program  code  will  of  course   be
  300.         compressed, and therefore may not be visible unless displayed  by
  301.         the program.
  302.  
  303.         Command Line Options
  304.         ____________________
  305.  
  306.         Options always begin with the "-" character and may occur in  any
  307.         order,  even  mixed up with the other arguments.   The  following
  308.         letter may be in either upper or lower case.
  309.  
  310.  
  311.          -r  Allows  program  compaction to continue even  if  the  space
  312.              saving   is  not  significant.   Normally   COMPACK   aborts
  313.              compaction  if  it cannot save at least  1024  bytes.   This
  314.              option  can  be  useful  where real  objective  is  to  make
  315.              unauthorised  disassembly  or modification  of  the  program
  316.              difficult rather than compression.  In addition this  option
  317.              retains the output program even if it contains excess  debug
  318.              information.   Use  this option with care.  It  is  possible
  319.              that the COMPACKted program will not work.
  320.  
  321.          -o  Displays  the  order  form  on  the  screen.   (Print   with
  322.              PrintScrn key).
  323.  
  324.          -i  Causes  COMPACK  to abort compaction if it  can  identify  a
  325.              possible optimisation of the input program.  See section  on
  326.              Optimising COMPACK.
  327.  
  328.          -g  Speeds  up  compression  (by about 50%) at  the  expense  of
  329.              program size (about 1% larger).
  330.  
  331.          -h  Most linkers produce EXE headers which are a multiple of 512
  332.              bytes so there may be considerable unused space.  Using  the
  333.              "-h"  option normal EXE program compression is bypassed  and
  334.              COMPACK  simply attempts to reduce the header to  a  smaller
  335.              multiple  of 16 bytes.  This is a useful technique  for  EXE
  336.              style device drivers or for very small EXE files.
  337.  
  338.          -v  This  option  specifies that the input program  has  already
  339.              been  COMPACKted  with the current version  of  COMPACK  and
  340.              allows  complete  recreation  of COM  programs  and  partial
  341.              recreation  of EXE files.  This option is designed to  allow
  342.              virus  scanning  and similar programs  to  check  COMPACKted
  343.              programs.   EXE programs expanded in this way will  be  non-
  344.              functional   (having  no  program  header   nor   relocation
  345.              information).   This non functionality is deliberate, as  we
  346.              do  not  wish  to  encourage  unauthorised  modification  of
  347.              commercial software.
  348.  
  349.  
  350.             Copyright (C) Prominence Computer Services Ltd. 1990,1991
  351.  
  352.  
  353.  
  354.  
  355.         COMPACK 4.5 User Manual                               Page 6
  356.  
  357.  
  358.  
  359.  
  360.         Examples
  361.         ________
  362.  
  363.             COMPACK bigprog.exe -g fastprog.exe
  364.             for %q in (*.com) do COMPACK %q d:%q -r
  365.             for %q in (*.exe) do COMPACK %q d:%q "Copyright (c) Fox 1991"
  366.  
  367.         Hardware and Software Requirements (Version 4.5)
  368.         ________________________________________________
  369.  
  370.                        COMPACK.EXE       program.com    program.exe
  371.  
  372.           Free Memory  256 k Bytes       65k Bytes      Program + 16k
  373.           DOS          2.0 or later      Any            Any
  374.           CPU          8088              8088           8088
  375.  
  376.  
  377.                              COMPACK Error Messages
  378.                              ______________________
  379.  
  380.                                                                      Exit
  381.                                                                      Code
  382.  
  383.              Insufficient memory                                     3
  384.              Error writing output program                            3
  385.              EXE header too large at XXXX bytes                      3
  386.              Unsuitable Overlay file                                 3
  387.              Unsuitable HIGH loading EXE file                        3
  388.              Cannot open FILENAME                                    3
  389.              Insufficient Saving.  Program not compacted.            3
  390.              COM file > 64k Bytes                                    3
  391.              EXE program contains excess debug info or overlays.     3
  392.              Invalid EXE header.  Relocation overlap.                3
  393.              Input and output filenames must be different            3
  394.              COMMAND.COM should not be COMPACKted                    3
  395.              Invalid EXE header.  Actual length less than Reported   3
  396.  
  397.         All  the  above error messages are fatal, causing  the  immediate
  398.         termination of the program.
  399.  
  400.         Note the error message regarding excess debug information.   This
  401.         condition is noted when the DOS file size is significantly longer
  402.         than  the  file size registered in the EXE file  header.   It  is
  403.         possible  that  the  excess information is an  overlay  or  other
  404.         essential information which is read from disk at execution  time.
  405.         This condition is considered a warning if the "r" (retain) option
  406.         is specified.  Naturally such programs may not function correctly
  407.         when compacted so testing is essential.
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.             Copyright (C) Prominence Computer Services Ltd. 1990,1991
  422.  
  423.  
  424.  
  425.  
  426.         COMPACK 4.5 User Manual                               Page 7
  427.  
  428.  
  429.                             COMPACK Warning Messages
  430.                             ________________________
  431.  
  432.              Warning: Multi-segment COM file.
  433.              Warning: File may have been already compressed with EXEPACK.
  434.              Warning: It may be possible to convert file to COM format.
  435.              Warning: No significant saving - new program created anyway.
  436.              Warning: Already COMPACKted.
  437.              Warning: Probable Device Driver.
  438.  
  439.  
  440.         Warning messages are purely informatory and point out some format
  441.         of  the  source  program  file  which  deserves  attention.   For
  442.         example,  the  possibility  of using COM2EXE  to  convert  multi-
  443.         segment  COM files back into the original EXE format.   Similarly
  444.         other  utilities  may  strip off debug  information.   These  are
  445.         usually  included with the compiler or operating system.  In  all
  446.         cases even greater execution speed and smaller programs should be
  447.         possible.  In the next section we will see how to transform these
  448.         programs into a more simple and suitable format for compression.
  449.  
  450.  
  451.                                Optimising COMPACK
  452.                                ___________________
  453.  
  454.         COMPACK obtains best results when it compresses a program in  its
  455.         most simple format.  By using the -i command line option  COMPACK
  456.         attempts  identify what kind of program is being  compressed  and
  457.         returns  with  a  DOS error code.  This can be used  by  a  batch
  458.         program to simplify the program (possibly expanding it) prior  to
  459.         re-compacting it again with COMPACK.
  460.  
  461.  
  462.              Exit Code      Program Type
  463.  
  464.                   16        Already compressed by PKLITE
  465.                   15        Already compressed by LZEXE
  466.                   14        Probable Device Driver
  467.                   13        Normal EXE
  468.                   12        Convertible to COM format with EXE2BIN
  469.                   11        Already Packed by EXEPACK
  470.                   10        Multi-segment COM File
  471.                    9        COMPACKted File
  472.                    0        Normal COM File
  473.                    3        Error
  474.  
  475.  
  476.         In  order to automate the process of converting programs  into  a
  477.         more  efficient  format prior to using COMPACK you  can  use  the
  478.         batch  command  file REPACK.BAT.  REPACK  uses  utility  programs
  479.         supplied  by  third  parties to perform the  conversion.   It  is
  480.         invoked in the same way as COMPACK :-
  481.  
  482.              REPACK bigprog.exe smallprog.exe
  483.  
  484.         EXE  programs  are  convertible to COM format  if  there  are  no
  485.         relocatable items, if there is no stack segment, if the  starting
  486.         execution address is 100H and the code fits into one 64K segment.
  487.         The appropriate conversion program, EXE2BIN is supplied with many
  488.         DOS operating systems.
  489.  
  490.  
  491.             Copyright (C) Prominence Computer Services Ltd. 1990,1991
  492.  
  493.  
  494.  
  495.  
  496.         COMPACK 4.5 User Manual                               Page 8
  497.  
  498.  
  499.  
  500.         EXEPACK is a utility supplied by Microsoft which attempts  simple
  501.         compression  of an EXE file.  For example it performs run  length
  502.         encoding,  compressing  repeated  bytes  into  a  more  efficient
  503.         format.   This compression is sometimes quite  effective  because
  504.         many programs have data areas initialised to some constant value.
  505.         Of  course run length encoding is only special case of  COMPACK's
  506.         sliding  window  algorithm.   In short anything  EXEPACK  can  do
  507.         COMPACK should be able to do rather better!
  508.  
  509.         Multi-segment  COM  files  are small EXE files  which  have  been
  510.         converted to COM format by a proprietary utility.  The format  is
  511.         used  in various system programs supplied with PC-DOS and  MS-DOS
  512.         (for  example CHKDSK.COM).  The reason for using this  format  is
  513.         not  clear  because  it results in larger COM  files  which  load
  514.         slower than their EXE counterparts.
  515.  
  516.                               Compacting BIOS Files
  517.                               _____________________
  518.  
  519.         IO.SYS  and IBMBIO.COM may be successfully compressed by  COMPACK
  520.         even though strictly speaking they are neither COM nor EXE  style
  521.         files.  COMPACK takes care of all the details without any special
  522.         options.   Neither MSDOS.SYS nor IBMDOS.COM may be  compacted  at
  523.         present.
  524.  
  525.  
  526.                                   PROBLEM CASES
  527.                                   _____________
  528.  
  529.         Not all executable files may be compressed successfully:  COMPACK
  530.         may (see messages) abort compression if:-
  531.  
  532.              - the .EXE file is an overlay.
  533.              - the .EXE file is a high memory loading program.
  534.              - the .COM file is larger than 65000 bytes.
  535.              - the .EXE file contains overlays or debug information
  536.              - the program is a device driver (eg CACHE.EXE).
  537.  
  538.         Executable files should be stripped of any debugging  information
  539.         prior  to compression as this is not automatically  removed,  and
  540.         cannot  be  used  by a debugger in  compressed  form.   Naturally
  541.         inferior compression results by including inaccessible  debugging
  542.         information in a compacted file.  COMPACK attempts to detect this
  543.         situation  and  aborts compaction if the program size  is  longer
  544.         than  specified in the EXE header.  However compaction  continues
  545.         if the -r switch is used.
  546.  
  547.         Programs  which  rely  on  re-reading  themselves  from  disk  or
  548.         checking their own size such as COMMAND.COM and certain protected
  549.         software programs may fail to execute correctly when  compressed.
  550.         COMPACK  cannot  always detect such  programs  automatically,  so
  551.         thorough testing is essential.  Always maintain a backup copy  of
  552.         the original program.  COMPACK aborts compression if  COMMAND.COM
  553.         is  specified as the input program unless the -r switch is  used.
  554.         Using  the /P parameter the SHELL command in CONFIG.SYS can  load
  555.         COMMAND.COM  permanently in memory so it should never be  re-read
  556.         and  therefore works in compacted form.  Unfortunately this  does
  557.         not  always  work  with some  operating  system  and  application
  558.         program combinations so again, careful testing is essential.
  559.  
  560.  
  561.             Copyright (C) Prominence Computer Services Ltd. 1990,1991
  562.  
  563.  
  564.  
  565.  
  566.         COMPACK 4.5 User Manual                               Page 9
  567.  
  568.  
  569.  
  570.              Example:-
  571.                              SHELL=C:\COMMAND.COM /P
  572.  
  573.  
  574.                                  KNOWN ANOMALIES
  575.                                  _______________
  576.  
  577.         1) COMPACK aborts compaction of an EXE file with more than  about
  578.         12000  relocatable segment references.  Fortunately very few  EXE
  579.         files are this large.
  580.  
  581.         2) COMPACK does not update the checksum field in the .EXE header.
  582.         This  field is not used by DOS, and consequently there should  be
  583.         no ill effects under compatible operating systems.
  584.  
  585.         3)  OS/2  and  Microsoft  (tm)  Windows  format  files  are   not
  586.         supported.
  587.  
  588.         4) BUILDSFX does not check for duplicate filenames.
  589.  
  590.  
  591.  
  592.  
  593.                                    Disclaimer
  594.                                    __________
  595.  
  596.         Prominence Computer Services Ltd. hereby disclaims all warranties
  597.         relating to this software, whether express or implied,  including
  598.         without  limitation any implied warranties of merchantability  or
  599.         fitness  for a particular purpose.  Prominence Computer  Services
  600.         Ltd.   will   not  be  liable  for   any   special,   incidental,
  601.         consequential,  indirect  or  similar  damages  due  to   program
  602.         malfunction or any other reason.  In no event shall the liability
  603.         of  Prominence Computer Services Ltd. for any damages exceed  the
  604.         price paid for the licence to use the software, regardless of the
  605.         form of the claim.  The person using the software bears all risks
  606.         as to the quality and performance of the software.
  607.  
  608.  
  609.         COMPACK  has  been  tested  on  many  thousands  of  files   with
  610.         successful  results.   Nevertheless the  possibility  of  program
  611.         errors  can never be completely eliminated.  Testing, of  course,
  612.         is the responsibility of the user.  But if you have any comments,
  613.         suggestions or complaints, please contact us.  We will  endeavour
  614.         to assist all registered users.  Naturally we intend to  continue
  615.         development  of COMPACK and feedback from users is  an  essential
  616.         part of this process.  Thank you for your cooperation.
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.             Copyright (C) Prominence Computer Services Ltd. 1990,1991
  632.  
  633.  
  634.  
  635.  
  636.         COMPACK 4.5 User Manual                               Page 10
  637.  
  638.  
  639.                  Answers to some common questions about COMPACK
  640.                  ______________________________________________
  641.  
  642.         Q:  How is it possible that COMPACK can compress programs  better
  643.         than the best archiving programs?
  644.  
  645.         A:  COMPACK  understands  the contents of program  files  and  is
  646.         optimised to compress programs efficiently.  For example  COMPACK
  647.         can  realise  that  much of the space dedicated to  an  EXE  file
  648.         header  is  redundant.  General purpose archivers  apply  general
  649.         purpose algorithms, paying more attention to compression time and
  650.         archive  updating at the expense of compressed archive  size  and
  651.         expansion time.
  652.  
  653.  
  654.         Q: Will a compressed program always behave like the original?
  655.  
  656.         A: Apart from programs which attempt to read themselves, (such as
  657.         COMMAND.COM,  overlay programs, programs with  debug  information
  658.         etc.)  all programs will run similarly (probably faster)  because
  659.         the  expansion  code  constructs an identical  program  image  in
  660.         memory  just as if the program had been loaded in memory by  DOS.
  661.         Naturally there has to be a little extra memory for the expansion
  662.         code  to  run but this is only a few kbytes.  Unlike  some  other
  663.         compressed  programs, COMPACKted programs may be  freely  renamed
  664.         because they do not attempt to read themselves.
  665.  
  666.  
  667.         Q: However fast the expansion algorithm may be, surely it takes a
  668.         finite  amount  of time and therefore compacted  programs  should
  669.         take longer to execute?
  670.  
  671.         A:  Almost all compacted programs execute faster because  smaller
  672.         programs  load  faster.  The code expansion  rate  can  typically
  673.         exceed  10  Mbits per second on an 80386 and this is  far  faster
  674.         than the overall throughput of a network or mechanical disk.
  675.  
  676.  
  677.         Q:  How can I be sure that COMPACK will work with my  application
  678.         program?
  679.  
  680.         A:  If  your application works with any other compacter  such  as
  681.         Microsoft's  EXEPACK, it will almost certainly work with  COMPACK
  682.         but with much better performance.
  683.  
  684.  
  685.         Q:  What  programs  are the best candidates  for  compression  by
  686.         COMPACK?
  687.  
  688.         A:  The  bigger  the  better!   Small  programs  are   compressed
  689.         successfully  but there will always be fixed overhead (about  300
  690.         bytes)  of the expansion code to consider.  This code  becomes  a
  691.         smaller proportion of the whole for large programs.  In  addition
  692.         the   compression  itself  becomes  more  efficient  for   larger
  693.         programs.
  694.  
  695.         Q. Much of our distribution software includes data files as  well
  696.         as  programs.  How can COMPACK be used to  minimise  distribution
  697.         media costs?
  698.  
  699.  
  700.             Copyright (C) Prominence Computer Services Ltd. 1990,1991
  701.  
  702.  
  703.  
  704.  
  705.         COMPACK 4.5 User Manual                               Page 11
  706.  
  707.  
  708.  
  709.         A. Use COMPACK and our BUILDSFX utility to create self extracting
  710.         files.  The programs created by this combination are the smallest
  711.         and fastest available, way ahead of any competitive solution.
  712.  
  713.         Q. Will my compacted application work on non-standard platforms?
  714.  
  715.         A. Almost certainly.  COMPACTed programs make no extra DOS  calls
  716.         and  access no DOS nor BIOS memory structures when expanding  and
  717.         so should be compatible even with non DOS operating systems which
  718.         recognise standard EXE and COM programs.   But note that  COMPACK
  719.         does  not  support Microsoft's Windows format nor  other  formats
  720.         which will not run under DOS.
  721.  
  722.         Q. Why does my compacted application not work?
  723.  
  724.         A.   It  is  possible  your  application   uses   non-initialised
  725.         variables.  Check its execution when running in different  memory
  726.         configurations,  when running under a debugger etc.   Also  check
  727.         there  is  sufficient RAM available.  As a final  resort  contact
  728.         Prominence with sample program.
  729.  
  730.  
  731.         Q. How much extra memory does a compacted program use?
  732.  
  733.         A. A COM style program uses the full 64K byte segment  regardless
  734.         of  how  big  the  original file was.   This  is  a  very  modest
  735.         requirement  as today most PCs come with at least 640  kBytes  of
  736.         RAM.   An EXE style program needs an extra 0 to 16  kBytes  extra
  737.         (3k  bytes  is  typical).   You can find  out  the  exact  memory
  738.         requirements of EXE programs using Microsoft's EXEMOD utility.
  739.  
  740.  
  741.         Q. Why is it better to prefer COM files over EXE files?
  742.  
  743.         A.  COM  files  contain no  relocation  tables  and  consequently
  744.         relocation is not included with the expansion code, so  compacted
  745.         COM  files are slightly smaller.  Because all COM files  must  be
  746.         smaller than 64 kBytes, the expansion code is faster as it is not
  747.         necessary to cope with multiple segments.
  748.  
  749.  
  750.         Q. Why does COMPACK think that my COM file is an EXE program (and
  751.         vice versa)?
  752.  
  753.         A.  Good question.  An EXE file always starts with the  signature
  754.         bytes "M" "Z" and a COM file does not.  The filename extension is
  755.         ignored by both DOS and COMPACK in determining whether or not the
  756.         program is EXE style.
  757.  
  758.  
  759.         Q.  How much does a licence cost to use COMPACK on  software  for
  760.         corporate distribution?
  761.  
  762.         A.  A $125 one time fee permits distribution of up to  500  disks
  763.         per  year  compacted  by COMPACK.  No  licence  requirements  are
  764.         necessary for user groups, clubs etc who distribute software on a
  765.         non profit making basis.  Licensing of BUILDSFX is negotiable.
  766.  
  767.  
  768.             Copyright (C) Prominence Computer Services Ltd. 1990,1991
  769.  
  770.  
  771.  
  772.  
  773.         COMPACK 4.5 User Manual                               Page 12
  774.  
  775.  
  776.                   COM2EXE - Multi-Segment COM to EXE Converter
  777.                   ____________________________________________
  778.  
  779.         Purpose
  780.         _______
  781.  
  782.         COM2EXE is a simple utility program which converts certain multi-
  783.         segment  COM  files  to smaller EXE format.   Many  system  files
  784.         supplied with DOS operating systems use this format.  COMPACK  is
  785.         able to recognise this format prior to compressing a file and can
  786.         return  immediately  with  an identifying error code  if  the  -i
  787.         option is used.  REPACK.BAT uses this option to optimise  program
  788.         compression.
  789.  
  790.         Multisegment  COM files consist of a normal EXE program  together
  791.         with  special  extra  code  to  perform  segment  relocation  and
  792.         register initialisation.  The COM2EXE utility simply removes this
  793.         excess  code creating a smaller program which can  be  compressed
  794.         better than the original COM file.
  795.  
  796.         It  is  important  to note that only special  COM  files  can  be
  797.         converted  in this way.  COM2EXE will issue a warning message  if
  798.         used on inappropriate files.
  799.  
  800.  
  801.         COM2EXE Syntax
  802.         ______________
  803.  
  804.              COM2EXE input-prog.COM output-prog.EXE
  805.  
  806.         COM2EXE requires DOS 2.0 or later and 256k bytes of free memory.
  807.  
  808.  
  809.         Example Use
  810.         ___________
  811.  
  812.              COM2EXE D:CHKDSK.COM  E:CHKDSK.EXE
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.             Copyright (C) Prominence Computer Services Ltd. 1990,1991
  841.  
  842.  
  843.  
  844.  
  845.         COMPACK 4.5 User Manual                               Page 13
  846.  
  847.  
  848.                     BUILDSFX - Self Extracting Program Creator
  849.                     __________________________________________
  850.  
  851.         Purpose
  852.         _______
  853.  
  854.         BUILDSFX is a utility program to concatenate multiple data  files
  855.         into  a single EXE style program which re-creates the data  files
  856.         in the current directory when executed.  COMPACK is automatically
  857.         invoked to compress the program providing a very efficient  means
  858.         of distributing all kinds of data and program files.   Benchmarks
  859.         show  that  creating  files  in  this  way  is  far  faster  than
  860.         conventional  self extracting files (up to 20 times  faster)  but
  861.         file  size is smaller than the best archiving programs.  In  fact
  862.         it is usually faster to execute a BUILDSFX file than use DOS COPY
  863.         command!
  864.  
  865.  
  866.         BUILDSFX Syntax
  867.         _______________
  868.  
  869.              BUILDSFX [-p] input-file(s) output-program
  870.  
  871.         The   first   parameters   are  one  or   more   ambiguous   file
  872.         specifications,  (ie  they may optionally contain  '*',  or  '?')
  873.         defining the input files to be included in the program.  The last
  874.         parameter  is the name of the output program which is created  in
  875.         COMPACKted  EXE  format.   Both may  contain  pathnames.   It  is
  876.         essential that COMPACK.EXE is in the current path.
  877.  
  878.         BUILDSFX  creates a temporary file, BUILDSFX.$$$, on the path  as
  879.         the  output program and the invokes COMPACK to compress it.   The
  880.         temporary file is deleted afterwards.  You  may wish to speed  up
  881.         compression  or  avoid  space problems on the  output  device  by
  882.         specifying the directory where the temporary file should be made.
  883.         This  is  done by way of the DOS environment variable  TMP,  used
  884.         also by many other PC applications.  For example if you wish  the
  885.         temporary  file  to written to the RAM disk drive  d:  one  could
  886.         include the following DOS command in AUTOEXEC.BAT file.
  887.  
  888.              SET TMP=D:\
  889.  
  890.  
  891.         The  optional  -p switch indicates that the first file is  to  be
  892.         extracted as a prompt to the screen when the SFX executes.   This
  893.         allows the user the software distributor to explain to the  user,
  894.         in  the  appropriate  language,  that  he  is  executing  a  self
  895.         extracting file.  The prompt file is sent to the screen (standard
  896.         output) and the program waits for any key to be pressed when file
  897.         extraction   commences.   (^C  or  the  BREAK  key  aborts   file
  898.         extraction).
  899.  
  900.         BUILDSFX requires DOS 2.0 or later and 256k bytes of free memory.
  901.  
  902.  
  903.         Example Use
  904.         ___________
  905.  
  906.              BUILDSFX D:\TXT\*.?OC  E:MAKEDOC.EXE
  907.              BUILDSFX -p PROMPT d:\BIN\*.EXE d:\BIN\*.COM EXESFX.EXE
  908.  
  909.  
  910.  
  911.  
  912.             Copyright (C) Prominence Computer Services Ltd. 1990,1991
  913.  
  914.  
  915.  
  916.  
  917.         COMPACK 4.5 User Manual                               Page 14
  918.  
  919.  
  920.         Execution of the SFX
  921.         ____________________
  922.  
  923.         When  executed the SFX.EXE program will expand itself  in  memory
  924.         and  proceed to create its component data files (overwriting  any
  925.         files  with the same name) in the current  directory.   Obviously
  926.         there must be sufficient free memory available for SFX to run  so
  927.         care  should  be  taken  not  to  create  excessively  large  SFX
  928.         programs.  If necessary multiple SFX programs.
  929.  
  930.         The  SFX  returns  an  error  code  of  0  if  file  creation  is
  931.         successful,  otherwise  a simple message is displayed  and  error
  932.         code  >  0 is returned.  These error codes can be detected  by  a
  933.         batch file or install program.
  934.  
  935.         Note  that  component  files  are  created  with  their  original
  936.         attributes and date and time stamps.
  937.  
  938.  
  939.         Using SFX programs on Single Diskette Systems
  940.         _____________________________________________
  941.  
  942.         One of the most frustrating problems using conventional  archives
  943.         is  the  need  to access the archive file,  the  archive  utility
  944.         program and an empty destination diskette simultaneously.  Single
  945.         diskette  systems may require laborious and error prone  multiple
  946.         diskette  changes.  Because the SFX programs created by  BUILDSFX
  947.         do  not read themselves from disk, once loaded into  memory,  the
  948.         source diskette is no longer required.  Software distributors may
  949.         wish to advise their users that it is safe to change diskettes by
  950.         inserting the appropriate message in the optional prompt file.
  951.  
  952.         Naturally  if  it is intended that extraction is to  be  made  to
  953.         diskette, there must be sufficient space on that diskette for all
  954.         the  extracted  files!  (A warning message is given if  there  is
  955.         not).  To avoid potential errors of this kind it is wise to limit
  956.         the volume of files compressed into any one SFX program.  In  any
  957.         case sufficient memory must be available to hold all the expanded
  958.         files  in  memory.   In the event  that  insufficient  memory  is
  959.         available  the  operating system will abort loading  of  the  SFX
  960.         program.
  961.  
  962.  
  963.         Minimising SFX disk size
  964.         ________________________
  965.  
  966.         COMPACK works by compressing repeated byte strings so files which
  967.         are likely to contain similar strings should be grouped  together
  968.         in  the  SFX.  This can be done by reordering the  files  in  the
  969.         input  directory.  For example, it is often appropriate  to  sort
  970.         the  input  directory first by filename extension,  and  then  by
  971.         increasing file size.
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.             Copyright (C) Prominence Computer Services Ltd. 1990,1991
  984.  
  985.  
  986.  
  987.                          COMPACK COMMERCIAL USE LICENCE
  988.                          ______________________________
  989.  
  990.  
  991.         MEMORANDUM OF AGREEMENT
  992.         _______________________
  993.  
  994.         between  COMPANY.  (hereinafter called the Licensee)  of  COMPANY
  995.         ADDRESS,  of the one part and Prominence Computer  Services  Ltd.
  996.         (hereinafter called the Licenser) whose registered office is at 7
  997.         Old King Street, Bath BA1 2JW, England, of the other part.
  998.  
  999.         Definitions
  1000.         ___________
  1001.  
  1002.         a)  'The Product', means the Licensee's computer software,  known
  1003.         as APPLICATION.
  1004.  
  1005.         b)  'The  Utilities',  means  the  Licenser's  computer  software
  1006.         package known as COMPACK used for file compaction, and  described
  1007.         in  the documentation whether or not incorporated in whole or  in
  1008.         part  into  other software.  Where appropriate  in  context,  the
  1009.         phrase  includes all or any modifications substantially based  on
  1010.         or derived from the software package whether entitled COMPACK  or
  1011.         not.
  1012.  
  1013.  
  1014.  
  1015.         NOW IT IS HEREBY AGREED BETWEEN THE PARTIES HERETO AS FOLLOWS:-
  1016.         _______________________________________________________________
  1017.  
  1018.         1)   The  Licenser  hereby  grants  to  the  Licensee  the   non-
  1019.         transferable  and  non-exclusive  rights  use  the  Utilities  on
  1020.         Product  for  distribution  and the Licensee agrees  to  pay  the
  1021.         Licenser  a  one time fee of US $125.  This  agreement  does  not
  1022.         authorise  the distribution of the Utilities for profit, nor  are
  1023.         any rights are granted until the fee has been paid.  The Licensee
  1024.         may  terminate  this agreement in writing within 30 days  of  its
  1025.         execution for a full refund of any fee already paid.
  1026.  
  1027.  
  1028.         2)  The Licenser hereby warrants that the Utilities are  original
  1029.         and will in no way whatever infringe upon any existing copyright.
  1030.         The  Licensee agrees that all components of the Product  modified
  1031.         by  the  Utility  shall  be protected  by  copyright,  and  shall
  1032.         exercise  at  least the same care and diligence  to  protect  the
  1033.         Licenser's intellectual property as it does to protect its own.
  1034.  
  1035.  
  1036.         3)  The  Licensee agrees to acknowledge in the  Utilities  or  in
  1037.         their documentation that the use of COMPACK has been licensed  by
  1038.         the Licenser.
  1039.  
  1040.  
  1041.         4)  The  parties  to this Agreement  undertake  to  maintain  the
  1042.         confidentiality  of any communication which is specified  at  the
  1043.         time  as being confidential, and undertake not to  disclose  such
  1044.         information   as   sales  figures,  billing   methods,   pricing,
  1045.         algorithms,  technical specifications, program code  unless  such
  1046.         information is already made public (other than by breach of  this
  1047.         Agreement).
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.             Copyright (C) Prominence Computer Services Ltd. 1990,1991
  1056.  
  1057.         5)  Prominence  Computer  Services  Ltd.  hereby  disclaims   all
  1058.         warranties relating to the Utilities, whether express or implied,
  1059.         including   without   limitation  any   implied   warranties   of
  1060.         merchantability or fitness for a particular purpose.   Prominence
  1061.         Computer  Services  Ltd.  will not be  liable  for  any  special,
  1062.         incidental,  consequential,  indirect or similar damages  due  to
  1063.         program  malfunction or any other reason.  In no event shall  the
  1064.         liability  of Prominence Computer Services Ltd. for  any  damages
  1065.         exceed  the  price  paid for the licence  to  use  the  software,
  1066.         regardless  of  the  form of the claim.   The  person  using  the
  1067.         software bears all risks as to the quality and performance of the
  1068.         software.
  1069.  
  1070.  
  1071.         6) This Agreement shall be subject to and construed according  to
  1072.         the laws of England.
  1073.  
  1074.  
  1075.         __________________________________________      __________________
  1076.  
  1077.         Authorised Signature                            (Title and Date)
  1078.         COMPANY.
  1079.  
  1080.  
  1081.         __________________________________________      Director
  1082.         Authorised Signature                            1 January 1991
  1083.         Prominence Computer Services Ltd.
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.             Copyright (C) Prominence Computer Services Ltd. 1990,1991
  1124.  
  1125.  
  1126.