  ==========================================================================

                   SLACK 4.1, FreeWare, (c) 1997. by Smola
                      THE ULTIMATE DISK SLACK ANALYZER

  ==========================================================================
  Description
  ==========================================================================

  This program finds and shows the disk slack most precicely in the world.

  What is disk slack? (BLAH-BLAH section)

  FAT  and  VFAT  file  systems  (used by DOS and Win95) allocates space for
  files  in  units  called  clusters  so  one  file  has to use at least one
  cluster.  This  means if the size of a file is only 1 byte it will take up
  the space of a whole cluster...

  Example:  See  what free space you have on your disk. Create a 1 or 2 byte
  file  (or  just  an empty directory). See what space do you have left now.
  What space did the file take?

  There  is  no  cure  for  that  except  partitioning  your  drive or using
  different  file  system  (NTFS  or  FAT32).  That  is  so  because smaller
  partitions  have smaller clusters. The easiest way to find out if the disk
  slack is worth the partitioning is to use SLACK.

  ==========================================================================
  Differencies from the version 3.0
  ==========================================================================

  SLACK  is  now  aware of the Long File Names produced by Windows 95 (under
  DOS!) and of the entries of erased files left in the directory files.

  - parameters 'V' and 'S' affect all parameters, not just the next one
  - SLACK is a bit slower due to the direct FAT reading and calculating
  - Different progress indicator :)
  - New information output
  - Bug in percentage with simulated disk size removed

  ==========================================================================
  Differencies from the version 4.0
  ==========================================================================
  - Repaired FAT12 bug
  - File slack and directory slack are shown separately
  - Bug with unlabeled disks removed (wrong nuber of files was shown)
  - New algorithm for calculating cluster when given disk size
  - Removed bug if given disk size is bigger than 2047 MB

  ==========================================================================
  Safety
  ==========================================================================

  SLACK has been tested under these operating systems:

     *   MSDOS 6.20 - OK
     *   MSDOS 6.22 - OK
     *   MSDOS 7.00 - OK
     *   Windows 95 - OK
     *   Windows  NT - NT will complain for direct accessing disk but if you
                       countinue no damage will occur

  SLACK has been tested with these software products:

     *   STACKER 4.0 - OK but not very useful (see below) unless you want to
                       see what would it be without the compression
     *   DriveSpace 2.0 - see above
     *   RAM drives by RAMDRIVE.SYS (DOS 6.22)
     *   substituited   drives   by   SUBST.EXE  -  SLACK will work with the
                                                    original drive!


  SLACK has been tested with these hardware devices:

         IDE CDROM drives - it will report 'Invalid disk' error
                          - there is no suport for CD ROM drives!
         FDD 1.44 - OK
         *very* small partitions (<32MB) - OK (see 'Author's problems with
                                           DOS algorithms')

  WARNING: Not tested under FAT32. Anyway, it won't work fine!

  ==========================================================================
  Usage
  ==========================================================================

  Sintax is: SLACK [/s:<disk>] [/v] [/d] [disk1] [disk2]...

  [you  can  use  dash  (-)  or  slash (/)]

      ?           - help
     /s:<disk>    - analyzes with the given disk size
                     - must be an INTEGER value in MB
                     - maximum is 2047 MB
     /d           - processes only the subdirectories
     /v           - verbose output
    diskX         - if omitted, the current disk is analyzed

        Examples:       SLACK c d -d
                        SLACK /d
                        SLACK  C  E  F >MYLOG.TXT
                        SLACK /v /s:1500
                        SLACK /s:258 /d

  ==========================================================================
  Contact
  ==========================================================================
  Please, send info on any bug you see.

  asmolcic@foi.hr

  ==========================================================================
  Latest versions may be found on
  ==========================================================================
  http://www.foi.hr/~asmolcic/utils.htm

  ==========================================================================
  Technical  information - More about disk slack and Other
  ==========================================================================

  What does all make disk slack?

  1. files - OK, we all know that.
  2. directory  files  -  those files cannot be  seen by simple DOS commands
     (dir).  Those  files  keep  the  information  (the  so called DIRECTORY
     ENTRIES)  about  filenames,  dirnames,  sizes  etc.  Also,  they act as
     regular files (concerning diskslack).

     One  directory  entry is 32 bytes big. The more entries - the bigger is
     the directory file. So, what does make directory entries?

     - file information (name, size, time, date ... )
     -  directories  (every  directory  has  an  entry  for its name, parent
     directory [..] and current directory [.] )
     -  erased files (until you copy something into that entry or defragment
     your disk)
     -  Win95 long filenames (these are divided into several entries!). Mail
     me for more info.

     From  that  list  you  must exclude those entries in the root directory
     (because  the root is no part of the files section) and therefore SLACK
     does not count entries in the STARTING directory (whether it's the root
     or some other directory!).

  SLACK  supports  floppy  disks  and  small partitions with 12-bit FAT (see
  'Author's  problems  with  DOS algorithms'). It works on compressed drives
  but the output does not show the real situation because those drives don't
  have normal slack (e.g. STACKER 4.0 drives have no slack at all).

  If  you compare the results of SLACK with other programs you may find some
  discording but don't be afraid - SLACK is always more accurate.

  The percentage shown is: TOTALSLACK / DISKSIZE (just for the record!)

  Since  I  introduced  calculations  with erased entries and LFN entries no
  other  program  will  show you the same results as SLACK (especially under
  DOS).  Waste  for Windows and FS (FILESIZE) from Norton Utilities can show
  the same results only regarding simple files.

  SLACK is written in TP70 and TASM 4.1
  It  uses  no  hidden  routine  or something else weird, just reads FAT and
  Directory Files with INT 25h.

  ==========================================================================
  Author's  problems  with  DOS algorithms
  ==========================================================================
  I  didn't  find  out  how  does  DOS  exactly  sets  the cluster size of a
  partition. It has something to do with number of sectors per track (?), or
  maybe sectors per side (?), or maybe tracks per ...

  Anyway,  it  doesn't just matter the size of a partition (at least for the
  partitions smaller than 32 MB).

  The Proof:
  I  made  a  9MB  partition when I had 50 MB of empty space on my disk. The
  cluster  was  4096  bytes.  Then  I  repartitioned the disk and made a 9MB
  partition  again  but when I had only 16 MB free space (the FAT was always
  FAT16).  The  cluster  was  512  bytes!  Same  thing  happened  again with
  partitions of 18MB, 10MB, 5MB and 800KB!

  Who set the cluster size?
  I could use the Partition Magic software to set that size to minimum but I
  used the DOS format command.

  Since it can't be predicted how the disk structure will be layed out I use
  just  one  algorithm  for calculating cluster size. This algorithm assumes
  always FAT16 (even if it's wrong with partitions less then something...?).
  If the partition is less 32 MB is assumes cluster is 512 bytes.

  If you analyse a very small partition, don't worry because this problem is
  related  only  with given disk sizes. The real partition will be processed
  correctly.

  ==========================================================================
  Similar products you may want to try out
  ==========================================================================
  * WASTE for Windows (ver 2.6) by Joseph T. Glosz Jr
    Internet:    jtg@sd.znet.com
    CompuServe:  72633,1646

  * Wasted, ver 1.0 by William Luitje
    luitje@m-net.arbornet.org

  * FS  or FILESIZE from Norton Utilities 8.0 - this is my first utility for
    calculating slack and I just have to mention it :)

  ==========================================================================
  Thanks's
  ==========================================================================
  My  ex-girlfriend  because  if she hadn't dumped me I would have never had
  the time to do this.

                                              Ante Smolcic - Smola
  ==========================================================================

  P.S. If you think I'm crazy, please, e-mail it to me!