




      LLL  LLL  L   L LLLL  LLLL  LLLLL  LLL   LLL  LLLL  LLLLL L   L L   L
     L    L   L LL LL L   L L   L L     L     L     L   L L      L L   L L
     L    L   L L L L LLLL  LLLL  LLLL   LLL   LLL  LLLL  LLLL    L     L
     L    L   L L   L L     L  L  L         L     L L  L  L      L L   L L
      LLL  LLL  L   L L     L   L LLLLL  LLL   LLL  L   L LLLLL L   L L   L


                               L   L  LL     LL
                               L   L L  L   L  L
                               L   L   L    L  L
                                L L  L  L   L  L
                                 L    LL  L  LL




                          (C) 1993-96  Robert Hofmann




 1. Introduction
 ===============

  1.1 Legal stuff
  ---------------

   CompressRexx  is programm, to  compress & speed-up  ARexx-scripts. It is even
   possible to "convert" (not really ;-) ARexx-scripts into executables.

   The programs and files in this distribution are freely distributable, but are
   also Copyright (c)  Robert Hofmann. They may be freely distributed as long as
   no more than a nominal fee is charged to cover time and copying costs.

   No commercial usage is  permitted without written permission from the author.
   Everything in this distribution must be kept together, in original unmodified
   form and unmodified archive.


   CompressRexx is mailware :-). This  means if  you use it,  please write  me a
   short mail. You know,  it is frustrating  to write programs  and there are no
   responses from  the users if they  like it or  not... But of  course money is
   also welcome. ;-)


   Accepting these few points is the only condition for using CompressRexx...


   =============================================================================
   The author is not responsible for any  problems caused by using this program!
   =============================================================================


  1.2 General stuff
  -----------------

   I am not the best in  writing doc, but quiet good  in coding I think :-) This
   docs are a bit  short I have to  appolognize, but I hope you'll understand it
   anyway... Especially my English and the typo's ;-)


   If there is  anybody out there  who is able to &  wants translate the docs to
   his own language, please do so and send them to me! I'll add them to the next
   release. Also translators always will get the newest betas! ;-)

   Unfortunatly I don't have the will & time to translate my docs even to German
   - my time is better used for coding :-)





  1.3 Author
  ----------

   If  you  have  suggestions  or remarks about this program, or if you find any
   bugs, please let me know.


   Contacting the author:

     Internet .. :  robert@next.amistep.osn.de
                    http://www.osn.de/user/amistep

     FidoNet ... :  2:2490/1015.0
     AmigaNet .. :  39:171/101.0

     Snail-mail  :  Robert Hofmann
                    Poppenreuther Str. 26
                    D-90419 Nürnberg
                    Tel. +49-(0)-911-338121 (18-20h German time only!!!)
                    Germany

     Bank-Account:  Account-holder:  Robert Hofmann
                    Account-number:  67920
                    Bank-ID ..... :  76090000
                    Bank-name ... :  Volksbank Nuernberg e.G.





 2. Features
 ===========

  CompressRexx...

     ... is able to compress & speed-up ARexx-code
     ... is able to convert an ARexx-Script into an executable





 3. Usage
 ========

  CompressRexx SCRIPT/A,CMPSCR/A,FORCE/S,MAXLEN/K/N,HEADER/S,EXEC/S,VERSION/S,
               CMPMODE/K

     SCRIPT   name of the ARexx-script to compress
     CMPSCR   name or dir of the new compressed script
     CMPMODE  NORMAL or HEAVY (slower but more efficient)
     FORCE    override all security-checks
     MAXLEN   max. line-length for compression (>= 80 & <= 1024!!!)
     HEADER   keep the header of the original ARexx-script from the first '/*'
              to the first '*/'
     EXEC     convert the script to an executable file (see 4.2.)
     VERSION  try to keep the version-info (see 4.3)


  IMPORTANT:  1. Make sure that ARexx is running before you use CompressRexx!
                 Otherwise it will just quit without doing anything.

              2. *NEVER* try to compress a script containing lines > 1000 bytes
                 because such lines will be truncated to 1000 chars and the
                 result is a corrupted "compressed" script.





 4. Theory of operation
 ======================


  4.1 Compression
  ---------------

   CompressRexx will 'compress' the  script by removing  comments  and  multiple
   spaces.  Depending on the coding  style used  in the  script, compressing can
   produce substantial  space savings, and may also make the  resulting program/
   script execute very slightly faster.

   The compression is done intelligently, with due allowance for nesting of both
   quotes and comments, and treating all quoted material as strictly literal. It
   will  cause  problems  only for  scripts  that call the  SOURCELINE  built-in
   function or that depend on particular values of SIGL.

   Since v3.0 of CompressRexx, there  is also an even better  compression imple-
   mented -  CMPMODE HEAVY. It is  much slower  than NORMAL, but  it will  strip
   all unnecessary spaces. Just try it out. :-)



  4.2 Converting the script to an executable file
  -----------------------------------------------

   The ARexx script is  augmented  with an  assembler front end  that passes the
   script to ARexx as a string file to be executed as a function.

   Why  not  execute  it  as a  command?  Because  you can't  give  command-line
   arguments to a string  file executed as a  command. However,  by treating the
   script as a  function to which  the command  line is  the sole  argument, the
   command  line can be  accessed as ARG(1) (or  equivalently with  ARG or PARSE
   ARG) just as though you executed it with RX.

   The script is still contained  in the executable file, starting a little more
   than 500 bytes in.

   The script will *NOT* be  compiled into a real  executable! You  still need a
   working ARexx-enviorment.

   Also a big advantage of  this methode is, that  now, you can make even ARexx-
   scripts resident, what could be very usefull for often-called scripts.



  4.3 The version of an ARexx-Script
  ----------------------------------

   As you might  know, it is possible to get  the version via  the 'version'-cmd
   even from an ARexx-Script, if it was added to the script like

                        $VER: Test.rexx 1.0  (07.03.96)

   Even if you try 'version' on this document, you'll get this as version :-)


   Now if you use  VERSION together with EXEC, CompressRexx  will try to get the
   version  of  your  script by  using  the  command  'c:version'. If  this  was
   successful, it will add this version to the executable, so that you still can
   use the 'version'-command even on the executable.


   If you don't use EXEC, it is presummed, that you've already added the version
   -info to the header of your script. Use HEADER, to keep it.










  _  o         Robert Hofmann         2:2490/1015@FidoNet   37:108/220@TrekNet
 |<)_/#                              39:171/101@AmigaNet   107:1805/230@TrekNet
 TT  <T  robert@next.amistep.osn.de  56:63/201@XNet        213:314/9127@XCessNet

