home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / d / diet145f.zip / DIET145F.DOC < prev    next >
Text File  |  1992-10-25  |  31KB  |  786 lines

  1.  
  2.   ------------------------------------------------------------
  3.                   DIET.DOC for DIET.EXE v.1.45F
  4.               ------  by Teddy Matsumoto ---------
  5.                     (DOCFILE: October 1992)
  6.   ------------------------------------------------------------
  7.  
  8.  
  9. 1.0.  OVERVIEW.
  10.  
  11. 1.1.  DIET.EXE reduces the disk-storage space needed by ex-
  12. ecutable and data files WITHOUT giving up immediate access to
  13. such files.  DIET is a Freeware Program.
  14.  
  15.   (a)   When DIET compresses an EXECUTABLE file (.EXE or .COM),
  16.         it adds a header that automatically expands the file when
  17.         it is executed.
  18.  
  19.   (b)   On average, DIET reduces the size of .EXE & .COM files
  20.         by 40%.
  21.  
  22.   (c)   Self-expansion of DIETed .EXE & .COM files is so fast
  23.         that it is difficult to measure the change in the speed
  24.         of file execution.  You certainly won't notice any
  25.         change.
  26.  
  27.   (d)   DIET's self-expansion of .EXE and .COM files is similar
  28.         to PKLITE or LZEXE, except that DIET also lets you com-
  29.         press overlay files -- something that PKLITE and LZEXE
  30.         cannot do.
  31.  
  32.  
  33. 1.2.  What makes DIET really unique is its ability to compress
  34. DATA Files and to automatically expand them when you call them
  35. into an Word Processor or Editor to read or change them.
  36.  
  37.   (a)   To use that feature, you must load DIET so that it is
  38.         resident in memory (i.e., Terminate and Stay Resident, or
  39.         TSR).
  40.  
  41.   (b)   DIET reduces the size of an average DATA File by 2/3rd.
  42.  
  43.   (c)   DIET's automatic expansion of Data Files adds a little
  44.         time (on a 386SX-16 system, about 3 sec. compared to
  45.         loading a 100k byte unDIETed text file into an editor).
  46.         But that is a small price for the benefit of being able
  47.         to keep infrequently-used Data Files on your Hard Disk,
  48.         instead of having to store them on floppies. And you can
  49.         optionally set up DIET so that it will automatically
  50.         recompress Data Files when you exit your Editor.
  51.  
  52.   (d)   Many -- but not all -- application programs can use
  53.         DIETed DATA files.  For example, QUATTRO can use DIETed
  54.         ???.WQ1 files; dBASE cannot use DIETed ???.DBF files.
  55.         You'll have to experiment.
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105. This document is the USER'S GUIDE for DIET v.1.45F.  To learn
  106. about DIET's internals and changes from version to version, see
  107. DIETAPI.DOC and DIETTECH.DOC  Those much more technical documents
  108. are of no importance to the average USER of DIET, but are avail-
  109. able for programmers and the curious.
  110.  
  111.  
  112.  
  113. 2.0.  A QUICK INTRODUCTION TO WHAT DIET CAN DO.
  114.  
  115.  
  116. 2.1.  OVERVIEW.  For our discussion, it is useful to classify
  117. DOS files into three general types:
  118.  
  119.  
  120.        ∙  EXECUTABLE, i.e., ???.EXE and ???.COM
  121.  
  122.  
  123.        ∙  DEVICE DRIVERS, e.g., ???.SYS or ???.DRV
  124.  
  125.  
  126.        ∙  DATA, e.g. ???.DOC, ???.TXT, ???.WQ1, etc.
  127.  
  128.  
  129. 2.1.1.  DIET compresses EXECUTABLES and DRIVERS so that from the
  130. user's perspective they perform the same as if they were not
  131. compressed.  That means you can execute them directly, or load
  132. them from your CONFIG.SYS.  We call this feature selF-eXtracting,
  133. or SFX.
  134.  
  135.  
  136. 2.1.2.  You can use DIET to compress DATA-type files, but they
  137. are NOT self-extracting.  To use DIETed DATA files, you must
  138. either decompress manually or load DIET as a TSR so that they are
  139. decompressed automatically when your application program loads
  140. them.
  141.  
  142.  
  143. 2.1.3.  To compress your files on the current directory, simply
  144. type:
  145.                          DIET filename,
  146. or use wildcards, e.g.,
  147.                             DIET *.*
  148. When you use DIET without any options, EXECUTABLES and DRIVERS
  149. are compressed as SFX, and all other files as non-SFX types
  150. files.
  151.  
  152.  
  153. 2.1.4.  To know whether or not a file has been compressed by
  154. DIET, type:
  155.                              DIET -l
  156. That will display all files in the current directory, with com-
  157. pressed files in reverse color.
  158.  
  159.  
  160. 2.1.5.  To restore non-SFX compressed files to their uncompressed
  161. status, type
  162.              DIET -r filename.ext,  or  DIET -r *.*
  163.  
  164.  
  165. 2.1.6.  The simplest -- but not best -- use of DIET would be to
  166. execute both of the following commands in a directory:
  167.                             DIET *.*
  168. followed by
  169.                            DIET -r *.*
  170. That would leave you with EXECUTABLES and DRIVERS in SFX mode,
  171. and all other files (the DATA-type files) uncompressed.
  172.  
  173.  
  174. To restore all DIETed files, including compressed executable or
  175. driver files, type
  176.              DIET -ra filename.ext  or  DIET -ra *.*
  177.  
  178.  
  179. 2.2.  DIET in TSR Mode.
  180. We assume you're displaying DIET.DOC on your console, using
  181. the DOS MORE command, Vernon Buerg's LIST.COM, or your favorite
  182. Editor.  Try the following:
  183.  
  184.  
  185.   (a)   Return to DOS.
  186.  
  187.  
  188.   (b)   Execute:
  189.                             DIET DIET.DOC
  190.         That will compress this file.  If you now try view the
  191.         file with MORE, or read it with LIST or your favorite
  192.         editor, you'll get garbage.
  193.  
  194.  
  195.   (c)   Now Execute:
  196.                                  DIET -Z
  197.         That will load DIET in the TSR mode and allows you to
  198.         display DIET.DOC with MORE, LIST, or your Editor.  Try
  199.         it.
  200.  
  201.  
  202.   (d)   Remove the DIET TSR by executing:
  203.                                 DIET -ZR
  204.  
  205.  
  206.   (e)   Finally, restore (i.e., decompress) DIET.DOC by
  207.         executing:
  208.                            DIET -R DIET.DOC
  209.  
  210.  
  211.  
  212. 3.0.  USING DIET's OPTIONS
  213.  
  214.  
  215. 3.1.  The basic DIET command structure is:
  216.                    DIET [options] [file-names]
  217.                 {wild-cards are OK in filenames}
  218. Options require a prefix.  You may use either "-" or "/" as the
  219. option-prefix.  Multiple options must be separated by spaces,
  220. e.g.
  221.                        DIET -z -p -td:\tmp
  222.  
  223.  
  224.  
  225. 3.2.  Options fall into two general categories:
  226.  
  227.  
  228.   (a)   BASIC options that specify fundamental DIET functions,
  229.         and
  230.  
  231.  
  232.   (b)   AUXILIARY Options that modify the operation of a BASIC
  233.         option.
  234.  
  235.  
  236. 3.3.  The following table summarizes the BASIC and AUXILIARY
  237. Options:
  238.  
  239.  ------------------------------------------------------------------
  240.  BASIC      Function of the           AUXILIARY Options that can
  241.  Option     BASIC Option              Be used with the BASIC option
  242.  ------------------------------------------------------------------
  243.  DIET w/o   Compress the named           -X,-XC,-G,-D,-B,-K,-I,-A
  244.   option    files                        -E, -Oxxxxx.
  245.  ------------------------------------------------------------------
  246.  -R,-RA     Decompress named files       -Oxxxxx.
  247.  ------------------------------------------------------------------
  248.  -Cxxxxx    Copy without                 -R,-RA,-A
  249.             decompress/recompress
  250.  ------------------------------------------------------------------
  251.  -L         Identify compressed files.
  252.  -H         Check integrity of compressed file, using CRC
  253.  ------------------------------------------------------------------
  254.  -!         Check DIET's own validity
  255.  -?         Display Help Screen.
  256.  -$         Compress later (see -N)
  257.  ------------------------------------------------------------------
  258.  -Z[n]      Load DIET as a TSR. Value    -P,-W,-N,-M
  259.             of [n] defines where in      -S,-Txxxxxx
  260.             memory DIET is loaded.
  261.  ------------------------------------------------------------------
  262.  -ZD        Disable TSR DIET  (also DIET OFF)
  263.  -ZA        Activate TSR DIET (also DIET ON)
  264.  -ZR        Remove TSR DIET from memory.
  265.  ------------------------------------------------------------------
  266.  
  267.  
  268.  
  269. 3.4.  The following table summarizes what the file-related
  270. AUXILIARY options do.  Not included in the table are the
  271. AUXILIARY options related to TSR-user of DIET -- they are dis-
  272. cussed at xx, below.  For more details on options, see the full
  273. discussion of options at xx, below.
  274.  
  275.                    SUMMARY of what FILE-RELATED OPTIONS do.
  276.                -X     Compress as SFX type.
  277.               -XC     Force compression of a .COM file as a real SFX .COM file
  278.                -G     Create a larger SFX header to speed up decompression
  279.                -D     Force compression as DATA type.
  280.                -B     Compare size in Byte count instead Cluster count
  281.                -K     Recompress DATA files upon termination of the
  282.                       application program that uses the files, but not while
  283.                       the application program is running.
  284.                -I     Ignore warning "may be overlay files!"
  285.                -Oxxxx Specify file name or path name of Output.
  286.                -A     Set READ ONLY attribute of the file.
  287.  
  288.  
  289. 3.5.  AUTOMATIC DECOMPRESSION BY USING DIET AS A TSR.
  290. The general syntax for making DIET terminate & stay resident is:
  291.                       DIET -Z[n] [options]
  292.         -Z    loads DIET into memory as a TSR.  If space is available
  293.               in upper memory (UMB), DIET will try to use it.
  294.               If Expanded memory is available, DIET will try to use it.
  295.               Under DOS 5.0, DIET -Z and DIET -Z1 achieve the same results.
  296.  
  297.         -Z[n] the [n], if present, tells DIET how to use Expanded Memory.
  298.              -Z0 do not use Expanded Memory (same as -Z alone)
  299.              -Z1 use Expanded Memory for DIET's temporary files.
  300.              -Z2 use Expanded Memory for both DIET's temporary files
  301.                  and for most of DIET's resident code, too.  If you
  302.                  have enough Expanded Memory, -Z2 saves you about 6k
  303.                  bytes of regular memory.
  304.  
  305.              -ZD   disables DIET in memory, but leaves it loaded.
  306.                    (DIET OFF does the same thing)
  307.              -ZA   restores DIET after -ZD has been used.
  308.                    (DIET ON does the same thing)
  309.              -ZR   removes DIET from memory.  But don't do that if you loaded
  310.                       other TSR's after DIET.
  311.  
  312.         AUXILIARY options available for use with BASIC option "Z" are:
  313.                -P     automates recompression of DIETed file that has
  314.                       been opened and changed.
  315.                -W     automates compression of newly created file.
  316.                -N     defers automated [re]compression until
  317.                       DIET -$ is issued.
  318.                -M     suppress messages in automated compression.
  319.                -S     display decompressed file size
  320.                -Txxxx specify temporary work directory for DIET's use
  321.  
  322.         Notes:  After DIET has been loaded as a TSR, additional use
  323.                 of "Z[n]" has no effect.  But you can modify DIET's TSR
  324.                 functions by using -ZD, -ZA, -ZR, or any of the AUXILIARY
  325.                 options, by executing DIET [options] after having
  326.                 loaded DIET as a TSR.
  327.  
  328.                 If you compress COMMAND.COM or some overlay files, you must
  329.                 make DIET resident in memory.
  330.  
  331.                 Regular users of DIET should include DIET -Z in their
  332.                 AUTOEXEC.BAT file.  Alternatively, you can also load DIET
  333.                 as a Device Driver, e.g.,
  334.                                 DEVICE=DIET.EXE -Z2 -P -K
  335.                 That uses a few additional bytes of memory, but allows
  336.                 you to DIET Device Drivers (to save disk space).  If you
  337.                 have large or many Device Drivers, that may be useful.
  338.  
  339.                 DIET's TSR function may be disabled if ^C or ^Break are used
  340.                 while DIET is executing, or by certain interrupts.  If DIET's
  341.                 TSR function disappears for an unknown cause, try restoring it
  342.                 by typing   DIET -ZA  at the command prompt.
  343.  
  344.  
  345.  
  346. 4.0.  Environment Variables.
  347.  
  348.  
  349. 4.1.  In DOS versions 3.0 and above, DIET uses the following en-
  350. vironment variable strings, if they are present.  You create them
  351. (usually from your AUTOEXEC.BAT file) as follows:
  352.                      SET NameOfEnvVar = data
  353.  
  354.  
  355. DIETOPT  lets you define the options you want used as a default,
  356.        e.g.,
  357.                            SET DIETOPT=-D -K
  358.        will use option -D and -K whenever a file is DIETed.
  359.        Options you can set with DIETOPT are: -J,-I,-D,-G,-K,-P,-W,-
  360.        N,&-S
  361.  
  362.  
  363. DIETOFF  DIET's ability to automate compression & decompression
  364.        can have certain undesirable effects.  For some programs,
  365.        you may prefer to disable DIET, e.g., to speed up file
  366.        copying without having to use Option -C (see below in
  367.        Sec.5.0.).  By including an environment string as below,
  368.        you tell DIET's TSR not to do what it usually would do
  369.        with DIETed files:
  370.        SET DIETOFF=COMMAND.COM;FC.COM;DUMP.EXE;XCOPY.EXE;LHA.EXE
  371.        You don't need to specify a Path for the files -- DIET is
  372.        concerned only with the programs' names.
  373.  
  374.  
  375. NODIET  You should suppress DIETing of some files, e.g., archives
  376.        like *.LZH and *.ZIP, and temporary intermediate files
  377.        created by some application programs.  You can also tell
  378.        DIET to ignore all files in specified directories -- if
  379.        your NODIET string ends with a Directory name, be sure to
  380.        append a "\".  There is a limit of 10 NODIET entries.
  381.        Example:
  382.             SET NODIET=*.LZH;*.ZIP;*.OBJ;C:\TMP\;C:\C600\  
  383.        will suppress DIETing of all *.LZH, *.ZIP, *.OBJ files,
  384.        and of all files in directories C:\TMP and C:\C600.
  385.  
  386.  
  387.   TMP  Define storage area for DIET's Temporary Files by putting
  388.        into your AUTOEXEC.BAT a line like:
  389.               SET TMP=E:\DirName     (see also Option -T.)
  390.        NOTE: When you use DIET in resident mode, it creates and
  391.        uses temporary files with names such as __DIET__.??? DIET
  392.        cleans up after itself by erasing such files automatically
  393.        when DIET finishes its tasks, but if you boot your system
  394.        or stop DIET's execution by Ctrl-Break, such files may
  395.        remain on your disk.  You can safely erase any such files.
  396.  
  397.  
  398. DIETSIZE  Some programs read in DATA files only to the size ob-
  399.        tained by the Function Call AH=4Eh/4Fh. The environment
  400.        variable:
  401.                    SET DIETSIZE=xxxxxx.COM;xxxxx.EXE
  402.        enables such programs to fully read compressed MSG or HLP
  403.        files.  Because some programs (e.g., SIDEKICK) check
  404.        DATA files by other methods, DIET cannot be used with
  405.        them.  You'll have to experiment.
  406.  
  407.  
  408.  
  409. 5.0.  DETAILS ABOUT DIET's OPTIONS, in ALPHABETICAL ORDER
  410.  
  411.  
  412.    -!  Makes a self-check of DIET.EXE's internal integrity.
  413.  
  414.  
  415.    -$  [Re]compress files whose automatic [re]compression was
  416.        deferred due to use of the -N option (see below).  This
  417.        command is effective only if you specified -N in addition
  418.        to -P and/or -W when you invoked DIET as a TSR.  The
  419.        DIET -$ command MUST be issued before you shutdown your
  420.        system -- it won't do it's job after a reboot.
  421.  
  422.  
  423.  
  424.    -A  Set Read-Only Attribute.  Few users will need to use the
  425.        -A option, but it's there for those who want to be extra
  426.        safe.  It is a safety measure for users who do not always
  427.        keep DIET in memory as a TSR.  If you were to call a
  428.        DIETed file into your editor without DIET in memory, it is
  429.        possible that your editor could lock up.  To restart you
  430.        would have to reboot, and you could lose your DIETed DATA
  431.        file. By using the -A option, you make any DIETed file
  432.        Read-Only.
  433.  
  434.  
  435.    -B  Few users will need this option, but it's there for those
  436.        who do.  If you don't fully understand the following
  437.        technical discussion, you don't need this option.
  438.        DIET will not compress files that would -- in their com-
  439.        pressed form -- use the same (or more) CLUSTERs of disk
  440.        space.  (The size of CLUSTERS vary with disks e.g., on a
  441.        High-Density 5.25" disk each CLUSTER consists of 1,024
  442.        bytes).  However, when you archive files with PKZIP or LHA
  443.        using those program's No-Compress options, you might want
  444.        to DIET them first to save as much space as possible.
  445.        The -B option tells DIET to compress the file even if the
  446.        number of CLUSTERS of the DIETed file is the same as the
  447.        un-DIETed version.
  448.  
  449.  
  450.    -C  Copying DIETed files with DIET's TSR in memory takes extra
  451.        time because DIETed files are automatically decompressed
  452.        before copying and recompressed after copying.  You can
  453.        suppress that by using DIET with the -C option to copy
  454.        files. The syntax is:
  455.                     DIET -C<destination> <FILENAMEs>
  456.  
  457.        Example 1.  To copy all files (including compressed files)
  458.        in the current directory of C:\ to Drive A:
  459.                            DIET -CA:\ C:\*.*
  460.  
  461.        Example 2.  To copy compressed files in drive A: to Drive
  462.        C: and simultaneously decompress them:
  463.                          DIET -RA -CC:\ A:\*.*
  464.        (See also the DIETOFF Environment Variable, above)
  465.  
  466.  
  467.    -D  DIET forces compression of any file (incl. xxx.COM &
  468.        xxx.EXE) as a Data type.  If DIET is loaded as a TSR, it
  469.        will decompress such files on-the-fly and will run them.
  470.        Why do this?  What benefit can you get?  Well, you can
  471.        save a little header space in that way (about 100 bytes
  472.        per executable file).  More importantly, programs that
  473.        load themselves into high memory, and programs that use
  474.        many overlays, can be run while DIETed as Data types if
  475.        they won't run after you DIET them using the -I option.
  476.        As with certain other highly-technical options, if you're
  477.        confused by this, just don't use the -D option.
  478.  
  479.  
  480.    -E  In its Default mode, DIET expands the file that is opened
  481.        by an application program into a temporary file, and erases
  482.        that temporary file at the termination of the application.
  483.        It is possible for WINDOWS 3.1 or some other DOS Task
  484.        Swapping program to confuse DOS' File Handles and erase
  485.        the original DIETed file instead of the temporary file,
  486.        even if the original file like (*.HLP or *.MSG files) was
  487.        set to R/O (ReadOnly).  The -E option is designed to avoid
  488.        that risk.  Use the -E option ONLY if you experience this
  489.        problem with a particular application.
  490.  
  491.  
  492.    -G  You can speed-up self-extraction if you're willing to use
  493.        an extra 100 bytes (about 200 vs. 100) for the SFX header.
  494.        It's worth trying on large executable files, especially
  495.        when the 100 extra bytes don't change the number of
  496.        Clusters used by the DIETed file.  We suggest you experi-
  497.        ment with this option and use it where it's to your
  498.        benefit.
  499.  
  500.  
  501.    -H  Make an integrity check of a DIETed file using a CRC
  502.        algorithm, and determine whether the -K option was used
  503.        when the file was DIETed.
  504.  
  505.  
  506.    -I  Ignore warnings.  DIET ordinarily refuses to compress
  507.        files with overlays when the size of the file in EXEHDR is
  508.        not the same as the file's actual size, or when a file is
  509.        to be loaded into high-memory (e.g., ADDRV.EXE).  But
  510.        since DIETed overlay files can be used when DIET is in its
  511.        TSR mode, you can use the -I option to force DIET to com-
  512.        press the files anyway.
  513.        DO NOT USE THIS OPTION UNLESS YOU LOAD DIET AS A TSR!!!
  514.  
  515.  
  516.    -J  Ignore this option unless you are using JDOS4.0 from IBM-
  517.        Japan and can read Japanese.
  518.  
  519.  
  520.    -K  Kill temporary Files Only on Quitting Program.
  521.        In its TSR mode, DIET opens a temporary file whenever a
  522.        program like an editor opens a compressed file.  In its
  523.        default mode, DIET erases the temporary file when the
  524.        program closes it. Some programs open, close, and reopen
  525.        files frequently, e.g. a Help Message file, or communica-
  526.        tions software with overlay protocol files.  That can be
  527.        very time consuming.  To avoid that, DIET such files using
  528.        the -K option -- then the temporary files will be erased
  529.        ONLY when you quit the main program from which the DIETed
  530.        files were expanded.
  531.  
  532.     -L [filename.ext] presents a directory listing for the
  533.        default disk, with the DIETed files in reverse color.  An
  534.        "#" means the file has a self-extracting header, and a "*"
  535.        means it is compressed as a DATA file.  If you add a
  536.        filename and filetype, you restrict the search to the
  537.        defined files.  Wildcard filenames are OK, e.g.,
  538.                              DIET -L *.EXE
  539.        DIET -L's default is the same as DIET -L *.*
  540.  
  541.  
  542.    -M  If you don't want DIET to give you a message about what it
  543.        is doing to your file, suppress the message with -M
  544.  
  545.  
  546.    -N  When the -W and/or -P options are specified when DIET is
  547.        loaded as a TSR, DIET automatically compresses newly
  548.        created files and recompresses files that are not set to
  549.        READ ONLY.  Specifying the -N option when DIET is loaded
  550.        as a TSR delays auto-compression and recompression until
  551.                                 DIET -$
  552.        is issued to instruct DIET to recompress changed files
  553.        and/or compress newly created files.  The time stamp of
  554.        the compressed files is set to when they were closed, NOT
  555.        to when they were actually compressed. This option is
  556.        useful if you don't want DIET to take time to recompress
  557.        files as you work, but prefer to have DIET do its job when
  558.        you're ready to quit.  The DIET -$ command works only if
  559.        you use it BEFORE you reboot.
  560.  
  561.  
  562.    -O  By default, DIET overwrites the files it compresses (or
  563.        uncompresses).  If you want to save the uncompressed (or
  564.        compressed) file, use the -O option to put the changed
  565.        file into another directory.  To illustrate:
  566.  
  567.        Example 1. You are NOT logged into DRIVE A:.  You want a
  568.        compressed version of A:ALPHA.DAT in your default
  569.        directory:
  570.                           DIET -O A:alpha.dat.
  571.  
  572.        Example 2. You want to compress ALPHA.DAT in your default
  573.        directory and store the compressed file in directory C:\TMP
  574.                          DIET -OC:\tmp\ alpha.dat
  575.           (note the positions of the spaces and back slashes!!)
  576.  
  577.  
  578.    -P  Use this option to automatically recompress changed DIETed
  579.        files, because in its default mode DIET does not re-
  580.        compress DATA files that were changed after being loaded
  581.        and manipulated by a program such as an Editor or a
  582.        Spreadsheet.  DIET -P enables automatic recompression.
  583.        Note: DIET's ability to automatically recompress DATA
  584.        files depends on your Editor's internal workings.
  585.        Experiment!
  586.  
  587.  
  588.    -S  Some application programs read in a specified amount of
  589.        data from overlay or other files, and get confused if
  590.        those files have been DIETed.  Specifying the -S option
  591.        when DIETing avoids that problem.  We suggest ALWAYS using
  592.        the -S option if you are going to archive files using LHA,
  593.        PKZIP, or PKARC.  There are no circumstances in which it
  594.        is disadvantageous to use the -S option -- we suggest
  595.        using -S when invoking DIET as a TSR.
  596.  
  597.  
  598.    -T  In its default mode, DIET stores in the default directory
  599.        certain temporary files that it creates and needs. If you
  600.        use the Environment Variable  TMP=??? (as may be required
  601.        by various programs), DIET will attempt to store its tem-
  602.        porary files in the directory that you've defined as ???.
  603.        To force DIET to use a particular directory for its tem-
  604.        porary files, use the -T option on the DIET line in your
  605.        AUTOEXEC.BAT file, e.g.
  606.                          DIET -Z2 -TD:\tmp1\  
  607.                DO NOT FORGET THE LAST "\" IN THIS OPTION.
  608.        The -T option is especially useful if you define a RAM
  609.        DISK directory as the recipient of DIET's temporary files.
  610.  
  611.  
  612.    -W  Automatically DIETs all newly-created files, including any
  613.        temporary files that your programs may create.  That can
  614.        be useful but can also waste time.  To avoid this option
  615.        becoming a nuisance, use the NODIET Environmental Variable
  616.        to suppress DIETing of files like *.OBJ, *.LZH. Or use -N
  617.        option together, and issue the command
  618.                                 DIET -$
  619.        before you quit your session.
  620.  
  621.  
  622.    -X  As a default, DIET recognizes as device drivers all files
  623.        with the extensions "SYS" or "DRV" and does NOT compress
  624.        them.  If you want to DIET a Device Driver, you must make
  625.        it self-extracting (because you won't have DIET in memory
  626.        as a TSR until you load it as a TSR in your AUTOEXEC.BAT
  627.        file). You can force DIET to add a self-extracting header
  628.        to any file by using the -X option.  But see also option
  629.        -I, above.
  630.  
  631.  
  632.   -XC  DIET always compresses a .COM file into .EXE file and
  633.        renames it as .COM.  You need not be concerned about this.
  634.        If you have a particular reason to want DIET to produce a
  635.        real .COM file, you can force that by using this option.
  636.        But be sure to experiment -- the behavior of such a .COM
  637.        file may be unpredictable.
  638.  
  639.  
  640. -Z[?]  See Sec.3.5., above.
  641.  
  642.  
  643.  
  644. 6.0.  CONCLUDING REMARKS.
  645.  
  646.  
  647. 6.1.  Don't allow DIET to be memory-resident when using HardDisk
  648. Managers like SPEEDDSK, OPTIMIZE, DOG.  Disable DIET by executing
  649. DIET -ZD when you use such programs!!  In fact, it's always best
  650. to clear ALL TSRs before using such programs.
  651.  
  652.  
  653. 6.2.  If you elect NOT to make DIET memory-resident:
  654.  
  655.  
  656.   (a)   Remember to manually decompress Data-type files before
  657.         using them.  You could simplify that by using Batch files
  658.         to decompress the Data-type files and then invoking your
  659.         application program from the Batch file.
  660.  
  661.  
  662.   (b)   When using a Laptop with a Ramdisk, a useful technique is
  663.         to store your application program and related Data files
  664.         on a floppy and transfer them to the Ramdisk (e.g.,
  665.         Drive D:) with:
  666.                            DIET -r -CD: a:*.*
  667.         When you're done, exit from the application program and
  668.         do:
  669.                              DIET -CA: D:*.*
  670.         That will compress the revised Data files and store them,
  671.         together with the application program, on A:.  Of course,
  672.         you must have enough room on A: to accept the revised
  673.         files.
  674.  
  675.  
  676. 6.3.  With DIET memory-resident:
  677.  
  678.  
  679.   (a)   Specifying a RAM disk for DIET's temporary files speeds
  680.         up DIET's operation -- see the -T option, above.
  681.  
  682.  
  683.   (b)   You may see a message like: "Can't find abc.exe" even
  684.         though the file exists.  This is usually the result of
  685.         DIET being unable to find enough space in your temporary
  686.         directory for its temporary files. Check the space in the
  687.         appropriate directory (the Default directory, of the
  688.         defined TMP directory) if you get this message.
  689.  
  690.  
  691.   (c)   DIETOPT variables modify DIET to avoid certain un-
  692.         desirable effects, like decompressing files before copy-
  693.         ing them and then recompressing those files after
  694.         copying.  To optimize DIET's performance in YOUR
  695.         application, experiment with the -C, -P, -W, and -K
  696.         options.
  697.  
  698.  
  699.   (d)   Word processors frequently write files back to disk
  700.         before you exit them, and create auxiliary files for
  701.         formatting or controlling a printer.  If you use the -P
  702.         option, that can take a lot of time for compressing and
  703.         decompressing these files. By specifying the -K option,
  704.         you defer all that DIETing until you exit the word
  705.         processor.  If you have plenty of space on your Hard Disk
  706.         or Ram Disk, it's easiest to specify -K when you load
  707.         DIET as a TSR.  If you're short of disk space, be selec-
  708.         tive about the files that are DIETed with the -K option,
  709.         by specifying -K when you DIET files that you want to
  710.         remain expanded until you quit a particular application
  711.         program.
  712.  
  713.  
  714.   (e)   The -P option is highly-desirable when you always use
  715.         DIET as a TSR, especially when appropriately used in
  716.         conjunction with -K. You may enjoy being reminded of the
  717.         space you're saving when you quit your application (DIET
  718.         tells you what it's doing).  If you don't want to be
  719.         reminded, use the -M option to tell DIET to do its work
  720.         quietly.
  721.  
  722.  
  723.   (f)   You can force DIET to compress executable files that use
  724.         overlays (and the overlays themselves) when you use DIET
  725.         as a TSR.  To do that, use the -K option and the -D op-
  726.         tion when DIETING such files.
  727.  
  728.  
  729.   (g)   You can toggle DIET on and off with "DIET ON" and DIET
  730.         OFF". Those commands also tell you the status of various
  731.         options.
  732.  
  733.  
  734.   (h)   DIET tries to keep track of filenames even with DOS 5.0's
  735.         task-swapping, or Windows in its enhanced mode. However,
  736.         you may find some application programs for which DIET
  737.         fails to trace tasks swapped.  Take due precautions with
  738.         task swapping -- experiment before relying on using DIET
  739.         with them.
  740.  
  741.  
  742.  
  743. 7.0.  DISTRIBUTION AND COPYRIGHTS
  744.  
  745.  
  746. 7.1.  Distribution Policy.  DIET.EXE and all documents packed
  747. with it are copyrighted by Teddy Matsumoto. The package consists
  748. of DIET.EXE, DIET.DOC, DIETTECH.DOC, DIETAPI.DOC and
  749. HISTORY.DOC.  No copyright is claimed for files that have been
  750. DIETed.
  751.  
  752.  
  753.  
  754. 7.2.  DIET may be copied, distributed, and used free of charge
  755. for PERSONAL use.  Licenses for commercial use must be obtained
  756. from Teddy Matsumoto PRIOR to making commercial use of DIET.
  757.  
  758.  
  759.  
  760. 7.3.  Except for a nominal fee for materials and postage, no one
  761. may charge for copying or distributing DIET.  DIET may be dis-
  762. tributed only as a complete package.  BBS and disk distributors
  763. should be prepared to distribute up-dates and fixes as such may
  764. be released.  The author will appreciate being advised by BBS
  765. operators and disk distributors that they are distributing DIET,
  766. so that he can try to assure that they received fixes and up-
  767. dates.
  768.  
  769.  
  770. 7.4.  CONTACTING THE AUTHOR. In Japan, Email to Teddy Matsumoto
  771. at GBG00230 on Nifty Serve.
  772. Overseas Users may contact K.Okubo at one of the following:
  773.                     74100.2565@compuserve.com
  774.                     GEnie:      K.Okubo
  775.                     INTERNET:   okubo@tansei.cc.u-tokyo.ac.jp
  776.  
  777.  
  778. This English Version of DIET.DOC was prepared by K.Okubo, with
  779. editorial assistance from Eric Stork (STORK on GEnie).
  780.  
  781.  
  782.  
  783.                                ###
  784.  
  785.  
  786.