home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 June / SIMTEL_0692.cdr / msdos / filutl / qcrc21.arc / QCRC.DOC next >
Text File  |  1987-11-16  |  19KB  |  483 lines

  1.  
  2.  
  3.  
  4.                                     QCRC.DOC
  5.                                     ========
  6.                               Quick CRC Calculator
  7.                                   Release 2.00
  8.  
  9.                                        by
  10.                                   W. G. Madison
  11.                         W.G. Madison and Associates, Ltd.
  12.                         Consultants / Information Systems
  13.                                   P. O. Box 898
  14.                                Greenbelt, MD 20770
  15.                                   (301)552-7234
  16.                              (CompuServe  73240,342)
  17.  
  18.  
  19.                              The Author is a member,
  20.                      Association of Shareware Professionals
  21.  
  22.  
  23.             ========================================================
  24.             |                       Shareware                      |
  25.             |                                                      |
  26.             | We encourage you to freely copy and share unmodified |
  27.             | copies  of this product  with other  people.  If you |
  28.             | decide to use the product, support the  Shareware    |
  29.             | marketing  concept by  becoming  a registered user.  |
  30.             ========================================================
  31.  
  32.  
  33.         DISCLAIMER
  34.         ----------
  35.  
  36.              This program is released for use AS IS. Neither the Author 
  37.         nor W.G. Madison and Associates, Ltd. will be liable for any 
  38.         actual or consequential damages resulting from its use, even if 
  39.         they have received prior notification of the possibility of such 
  40.         damage. 
  41.  
  42.  
  43.         PURPOSE     
  44.         -------
  45.  
  46.              How often have you received a disk containing some of your  
  47.         best friend's favorite software, spent two or more hours attempt-
  48.         ing to install it on your system, and then discovered that a 
  49.         critical file was flawed? If this has never occurred, or if you 
  50.         never give or receive (and never expect to give or receive) soft-
  51.         ware in this way, stop right here, and go back to whatever you 
  52.         were doing before you began looking at this file. QCRC is pro-
  53.         bably not for you.
  54.  
  55.              If, on the other hand, you have been in the above described 
  56.         situation, you will appreciate the advantage of having a quick 
  57.         way of checking whether or not the disk(s) contain(s) errors.
  58.  
  59.  
  60.  
  61.                                    1
  62.  
  63.  
  64.  
  65.              QCRC provides such an opportunity.
  66.  
  67.              QCRC is a utility for calculating a Cyclic Redundancy Check 
  68.         (CRC) for one or more files. The output, an alphabetized table of 
  69.         file names with their associated CRC values, is by default dis-
  70.         played on the screen. Optionally, it may be directed to a file. 
  71.  
  72.              Thus, using QCRC, your friend would have been able to in-
  73.         clude a file containing the CRC value for each file on the disk 
  74.         sent to you. Using QCRC's Verify option, you would then have been 
  75.         able to re-calculate the CRCs upon receipt of the disk, and check 
  76.         that the values were identical. There is a probability that two 
  77.         files could have the same size and yield the same CRC value, but 
  78.         not be identical. This probability is *extremely* small, however.
  79.  
  80.  
  81.         SYSTEM REQUIREMENTS
  82.         -------------------
  83.  
  84.              Hardware: PC/XT/AT or close compatible.
  85.                        50k bytes available after DOS and any desired      |
  86.              TSR's have been loaded. This is sufficient for processing
  87.              and sorting information for somewhat over 250 files. If a
  88.              greater capacity is needed, please contact the author at the
  89.              address at the top of this document.
  90.  
  91.              Software: DOS 2.x and higher. (Note: QCRC has been tested 
  92.              only on DOS 3.x. There is no reason, however, to expect that 
  93.              it will not run on 2.x systems.)
  94.  
  95.  
  96.         USAGE
  97.         -----
  98.  
  99.         {Note: Change bars (|) in the right margin indicate substantive
  100.         changes from the previous version 1.11}
  101.  
  102.         QCRC [[Dev:][Path]]FileSpec[/Switch=value[/Switch=value...]]
  103.             where
  104.                 [Dev:]   is an optional disk drive designator
  105.                 [Path]   is an optional path specifier
  106.                 FileSpec is a (possibly ambiguous) file specification
  107.                 Switch   is a switch designator, and
  108.                     If Switch is F then value is the file name to which
  109.                                           the output will be written.
  110.                                           Default is the screen.
  111.                     If Switch is C then value is the number of columns
  112.                                           the output will be formatted.
  113.                                           Default is /C=1
  114.                     If Switch is V then value is the name of the file 
  115.                                            whose contents will be used
  116.                                            for verification.
  117.                        If Switch is A then all files matching the selec-  |
  118.                                            tion mask will be verified.    |
  119.                                            The default action is to ver-  |
  120.  
  121.  
  122.                                    2
  123.  
  124.  
  125.  
  126.                                            ify only those files which     |
  127.                                            are selected AND appear in the |
  128.                                            verification file.             |
  129.         EXAMPLES:
  130.              QCRC *.ARC            will write the CRC for each .ARC file
  131.                                    in the current directory of the current
  132.                                    device.
  133.              QCRC A:*.*            will write the CRC for all files in the
  134.                                    current directory of device A:
  135.              QCRC B:\FOO\*.*       will write the CRC for all files in
  136.                                    directory \FOO of device B:
  137.              QCRC BAZ.*/F=MOO      will write the CRC for files BAZ.* with
  138.                                    output written to file MOO.
  139.              QCRC BAZ.*/F=LST:/C=2  will do exactly in the prior example,
  140.                                    but formatted in two columns on the 
  141.                                    printer.
  142.              QCRC BAZ.*/F=MOO/V=XYZ will again calculate the CRC for all
  143.                                    files BAZ.*, but will additionally
  144.                                    check the newly calculated CRC against
  145.                                    the value stored in file XYZ. The re=
  146.                                    sults of the comparison will be written
  147.                                    to file MOO. Only those BAZ.* files 
  148.                                    which appear in file XYZ will be 
  149.                                    verified.
  150.              QCRC BAZ.*/V=XYZ/A    exactly as in the prior example, but   |
  151.                                    all BAZ.* files will be verified.      |
  152.  
  153.  
  154.              Notes:
  155.  
  156.                   1. If the C option (/C=) is omitted, /C=1 is assumed. 
  157.                      If an invalid parameter value is supplied, /C=1 will 
  158.                      be used. Valid parameter values are the integers 1, 
  159.                      2, or 3.
  160.  
  161.                   2. If the /V= switch is included, any C option will be 
  162.                      ignored, and single column output will be provided.
  163.  
  164.                   3. If an output file (/F=) is intended for later use as 
  165.                      a verification file (/V=), then it *MUST* be written 
  166.                      in single column format.
  167.  
  168.                   4. If the output file (/F=) is intended to be used 
  169.                      later for validation/verification, this file may be 
  170.                      edited to include additional descriptive information 
  171.                      provided certain conditions are met. Specifically,
  172.  
  173.                      a. In using a file for verification, QCRC assumes 
  174.                      that any text line containing a '.' in column 11 
  175.                      *AND* a valid 4-digit hexadecimal number (i.e., 
  176.                      containing only the characters '0'..'9' and/or 
  177.                      'A'..'F') in columns 17 - 20) contains file informa-
  178.                      tion in columns 3 - 20 only.
  179.  
  180.                      b. Any information outside this range of columns is 
  181.  
  182.  
  183.                                    3
  184.  
  185.  
  186.  
  187.                      ignored.
  188.  
  189.                      c. Any lines not meeting the criteria set forth in 
  190.                      (a) are ignored.
  191.  
  192.                      Thus, the following file (e.g.,) would be perfectly 
  193.                      usable for validation/verification purposes.
  194.  
  195.                                            Columns
  196.                   0000000001111111111222222222233333333334444444444555555
  197.                   1234567890123456789012345678901234567890123456789012345
  198.                   -------------------------------------------------------
  199.  
  200.                     ARCM131 .ARC  E690 Version 1.31 of ARCMASTR. Minor 
  201.                        bug fixes. Fast exit.
  202.                     FFMT    .ARC  4BDF Fast disk format. A, B w/o pause, 
  203.                        or A alone. TURBO/PASCAL source incl.
  204.                     LIST62A .ARC  62D1 Version 6.2A of Vern Buerg's LIST. 
  205.                        See .DOC file for changes.
  206.                     QCRC    .ARC  5F3A Quick file-CRC calculator.
  207.  
  208.  
  209.                   5. Timing tests on QCRC have shown the following:
  210.  
  211.                      a. Normal file size mix: 250 files, 2.54mb total
  212.                         Run time: 5m23s without verification
  213.                                   5m35s with verification
  214.  
  215.                      b. Large file mix: 7 files, 2.43mb total
  216.                         Run time: 3m28s without verification
  217.                                   3m30s with verification
  218.  
  219.                      These timings should, of course, be regarded only as 
  220.                      "figures of merit". The absolute figures will change 
  221.                      as QCRC is run on systems with different hardware, 
  222.                      or differently configured than that on which the 
  223.                      tests were conducted.
  224.  
  225.  
  226.         HISTORY AND BACKGROUND
  227.         ----------------------
  228.  
  229.              For those unfamiliar with CRCs, suffice to say that they are 
  230.         very powerful generalizations of the more familiar 'parity check' 
  231.         schemes, such as those which have been used at least since the 
  232.         early days of digital magnetic tape recording.
  233.  
  234.              As such, calculating the CRC of a block of data prior to its 
  235.         transmission and again following transmission, and then comparing 
  236.         the results of the two calculations, provides an excellent indi-
  237.         cation of whether the transmission process introduced any errors 
  238.         into the data.
  239.  
  240.              It is important to realize that different file allocation 
  241.         schemes can lead to different CRCs on identical files. For exam-
  242.  
  243.  
  244.                                    4
  245.  
  246.  
  247.  
  248.         ple, the file allocation scheme used by DOS will lead to a differ-
  249.         ent CRC than the scheme used by CPM. Thus, in order to use QCRC 
  250.         effectively, you must be aware of both the originating and the 
  251.         destination environment. In most cases, this will not be a prob-
  252.         lem, but the potential exists and must be recognized.
  253.  
  254.              The CCITT (for those who enjoy living life the hard way, 
  255.         CCITT is the designation for the International Consultative Com-
  256.         mittee for Telephone and Telegraph, a branch of the United 
  257.         Nations) has recommended the use of a specific generator polynom-
  258.         ial for use in calculating the CRC for data blocks in asynchron-
  259.         ous communications. This polynomial is (X^16 + X^12 + X^5 + 1).
  260.  
  261.              While its recommended use primarily deals with block trans-
  262.         mission of data (as in the X/Y/ZMODEM protocols), it has come 
  263.         into widespread use also as a generator polynomial for file-level 
  264.         CRC. This is therefore the generator polynomial which has been 
  265.         used for QCRC.
  266.  
  267.              Those sufficiently interested and/or masochistic as to want 
  268.         to find additional information regarding the theory of CRC are 
  269.         referred to:
  270.  
  271.              1. SOBOLEWSKI, J.S., "Cyclic Redundancy Check", in Ralston, 
  272.         A. (ed.), Encyclopedia of Computer Science and Engineering (2nd 
  273.         Ed.), Van Nostrand Reinhold Co., 1983, p.434ff
  274.  
  275.              2. PLESS, V., "Introduction to the Theory of Error-
  276.         Correcting Codes", John Wiley and Sons, 1982, p. 59ff
  277.  
  278.              Both of these references include bibliography for additional 
  279.         study.
  280.  
  281.  
  282.         AND FINALLY
  283.         -----------
  284.  
  285.              QCRC copyrighted (C) 1987 by W.G. MADISON AND ASSOCIATES, 
  286.         Ltd.. All rights reserved.
  287.  
  288.         Distribution
  289.              QCRC is specifically authorized for distribution, under the 
  290.         SHAREWARE principle, via public electronic bulletin boards or by 
  291.         individual copying. Any distribution thus made must be in the 
  292.         form of this entire .ARC file, UNALTERED, including both the 
  293.         program executable file and this documentation file. NO OTHER 
  294.         FORM OF DISTRIBUTION, INCLUDING DISTRIBUTION AS PART OF A LARGER 
  295.         PACKAGE, NOR DISTRIBUTION FOR A FEE (other than a nominal copying 
  296.         charge), IS AUTHORIZED WITHOUT SPECIFIC WRITTEN PERMISSION OF THE 
  297.         COPYRIGHT HOLDER.
  298.  
  299.              If you find the program useful, and continue to use it past 
  300.         a reasonable trial period, you are required to send a check or 
  301.         money order in the amount of $10.00 (U.S. funds only, please) to 
  302.         the copyright holder at the address shown at the top of this 
  303.  
  304.  
  305.                                    5
  306.  
  307.  
  308.  
  309.         file.
  310.  
  311.              Clubs operating on a non-profit or not-for-profit basis may 
  312.         provide QCRC to their membership without payment of the normal 
  313.         registration fee, as a mechanism for validating disks received 
  314.         from the club library, provided that the other conditions of this 
  315.         section are met. Please send in the registration form, indicating 
  316.         the club name as the registered user.
  317.  
  318.         Support
  319.              Registered users are provided with free updates, telephone 
  320.         support. A recorder is provided on the telephone number listed 
  321.         above, if noone is in the office, and a call-back is guaranteed 
  322.         no later than the next business day. Bug fixes or work-arounds 
  323.         will be mailed to the complainent, if a registered user, and will 
  324.         also be uploaded to CIS (IBMSW) and to major BBS's in the metro-
  325.         politan DC area.
  326.  
  327.         Contact
  328.              Telephone contact may normally be made between the hours of 
  329.         7:00AM and 9:00PM (Eastern time), but see above. Non-registered 
  330.         users are welcome to call, and will be accommodated on a "time 
  331.         available" basis. Contact may, of course, always be made through 
  332.         CIS EMAIL on the PPN given above.
  333.  
  334.         Other Shareware Products
  335.              You may wish to try these other products of Madison and 
  336.         Associates:
  337.  
  338.            STORM - A comprehensive hard disk management aid. Provides:
  339.                      1. Directory listing of all files on the disk, 
  340.                         sorted by NAME.EXT, Directory, or Size 
  341.                         (Decreasing).
  342.                      2. Directory listing of all potentially duplicate 
  343.                         files on the disk.
  344.                      3. Global deletion of all files matching a user-
  345.                         supplied mask.
  346.                      4. WHEREIS-type function to locate all files match-
  347.                         ing a user-supplied mask.
  348.                      5. Summary of disk usage by subdirectory.
  349.                      6. Visual presentation of the directory structure of 
  350.                         the disk.
  351.            BPRINT - A utility to print files with banner pages. Prints 
  352.                      the name and extension in large block letters, fol-
  353.                      lowed by a date/time stamp of when printed and the 
  354.                      home directory of the file.
  355.            POTPOURI - A collection of (trivial and sophisticated) subpro-
  356.                      grams for users of TURBO/PASCAL. Includes:
  357.                      1. Procedures for displaying and reading data from 
  358.                         menus;
  359.                      2. Trancendental functions for TURBO/BCD;
  360.                      3. Procedures for manipulating dates, without re-
  361.                         striction (provided only that the dates being 
  362.                         manipulated are *after* October 15, 1582 AD, and 
  363.                         are *before* January 1, 7496237 AD);
  364.  
  365.  
  366.                                    6
  367.  
  368.  
  369.  
  370.                      4. Procedures for examining and manipulating direct-
  371.                         ory trees and files; and
  372.                      5. Some out-of-the-ordinary string manipulation 
  373.                         procedures.
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.                                    7
  428.  
  429.  
  430.  
  431.                        Product Registration & Comment Form
  432.                        -----------------------------------
  433.  
  434.  
  435.         Name:___________________________________________________________
  436.  
  437.         Company:________________________________________________________
  438.  
  439.         Address:________________________________________________________
  440.  
  441.         City:__________________________ State:_____  ZIP _______________
  442.  
  443.         Telephone:(_____) _____-_______
  444.  
  445.         Product name: QCRC                           Version:_____._____
  446.  
  447.  
  448.         Comments:
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.         Payment:
  470.  
  471.         Please register my copy of QCRC. ($10.00)                ____.__
  472.  
  473.                              (MD residents only) MD 5% Sales Tax ____.__
  474.  
  475.                                                            TOTAL ____.__
  476.  
  477.  
  478.         Mail To:
  479.                         W.G. Madison and Associates, Ltd.
  480.                         Consultants / Information Systems
  481.                                   P. O. Box 898
  482.                                Greenbelt, MD 20770
  483.