home *** CD-ROM | disk | FTP | other *** search
/ Shareware 1 2 the Maxx / sw_1.zip / sw_1 / UTILS / UNZ42DOC.ZIP / ship.doc < prev    next >
Text File  |  1992-03-20  |  5KB  |  124 lines

  1.   Ship is a program for sending binary files through email.  It is designed
  2.   to supplant uuencode and uudecode.  Ship encodes approximately 6.32 bits
  3.   per character mailed, compared to uuencode's 5.81 bits per character.
  4.  
  5.   Ship also has these features: a 32-bit CRC check on each file; automatic
  6.   splitting of the ship output into multiple, smaller files for speedier
  7.   mailing; automatic mailing of ship's output, with subject lines for
  8.   multiple parts; and a check on the sequence of parts when unshipping.
  9.  
  10.   Usage:
  11.  
  12.        ship [-nnn] [-m address] [-s subject] file ...
  13.  
  14.   where nnn is the maximum number of K bytes for each output file, address
  15.   is the address to send mail to, subject is a Subject" line prefix, and
  16.   file ... is a list of files to ship.  If no options are given, ship
  17.   outputs to stdout.  The simplest use is:
  18.  
  19.        ship foo > x
  20.  
  21.   where foo is converted into the mailable file, x.
  22.  
  23.   When -nnn is specified, but -m is not, ship writes to the files
  24.   part0001, part0002, etc., where each file has nnn or less K bytes.  For
  25.   example:
  26.  
  27.        ship -25 bigfoo
  28.  
  29.   will write however many 25K byte or less ship files is needed to contain
  30.   bigfoo.  If, say, six files are needed, then the files part0001 to part0006
  31.   will be written.
  32.  
  33.   When using -m, nothing is written, either to files or to stdout; rather,
  34.   the output is mailed to the specified address.  If -nnn is also specified,
  35.   then the parts are mailed separately with the subject lines part0001, etc.
  36.   If -nnn is not specified, then only one part (the whole thing) is mailed
  37.   with the subject line "part0001".  For example:
  38.  
  39.        ship -25 -m fred bigfoo
  40.  
  41.   will mail the six parts of bigfoo to fred.
  42.  
  43.   Any number of files can be shipped at once.  They become part of one long
  44.   ship stream, so if, for example -25 is specified, all but the last part
  45.   will have about 25K bytes.  For example:
  46.  
  47.        ship -25 -m fred fee fi fo fum
  48.  
  49.   will send the files fee, fi, fo, and fum to fred.
  50.  
  51.   Fred will get several mail messages with the subject lines part0001, etc.
  52.   He can then save those messages as the files, say, p1, p2, p3, ...
  53.   Then he can use the command:
  54.  
  55.        ship -u p?
  56.  
  57.   to recreate bigfoo, or fee fi fo and fum, depending on what he was sent.
  58.   If Fred saved the wrong numbers, ship will detect this and report a
  59.   sequence error.
  60.  
  61.   Note: there is enough information in the shipped parts to determine the
  62.   correct sequence.  A future version of ship will prescan the files to
  63.   determine the sequence, and then process them in the correct order.
  64.  
  65.   If a file being received already exists, ship -u will report an error
  66.   and exit.  The -o option avoids this and allows ship to overwrite existing
  67.   files.  The -o option must follow the -u option:
  68.  
  69.        ship -u -o p?
  70.  
  71.   In addition to the -u option, ship will unship if it sees that its name is
  72.   unship.  On Unix systems, this can be done simply by linking the executable
  73.   to unship:
  74.  
  75.        ln ship unship 
  76.  
  77.   Ship can also be used as a filter.  The special file name "-" means stdin.
  78.   For example:
  79.  
  80.        tar covf - foodir | compress | ship -25 -m fred -
  81.  
  82.   will tar the directory foodir, compress it, and ship it to fred in 25K byte
  83.   pieces.  Then, after Fred saves the files as p01, etc. at the other, end,
  84.   he can:
  85.  
  86.        ship -u p? | zcat | tar xovf -
  87.  
  88.   which will recreate the directory foobar and its contents.  ship -u knows
  89.   to write to stdout, since the original ship put the special file name "-"
  90.   in the first part.
  91.  
  92.   Ship uses a base 85 coding that needs 32-bit multiplication and division.
  93.   This can be slow on 16-bit machines, so ship provides a fast encoding
  94.   method by specifying the -f option.  This method is somewhat faster even
  95.   on 32-bit machines, and has approximately a 1% penalty in the size of the
  96.   encoded result (-f gives 6.26 bits per character, on the average).  The -f
  97.   option need only be used when shipping--unshipping (ship -u) automatically
  98.   detects the encoding used.  For example:
  99.  
  100.        ship -f -25 -m fred foo
  101.  
  102.   will send foo to fred in 25K byte pieces using the fast encoding method.
  103.   You don't need to tell Fred, since ship -u will figure that out for him.
  104.  
  105.   The fast encoding method is probabilistic, so it's possible for the size
  106.   penalty to be worse than 1%, and it's also possible for the fast encoding
  107.   to produce a smaller result than base 85 encoding would, all depending on
  108.   the data.
  109.  
  110.   The -q option can be used with either ship or unship (ship -u) for quiet
  111.   operation--informational messages are inhibited.
  112.  
  113.   You can find out the version of ship and get the command usage by using
  114.   "ship -h" or "ship -?".  The version number and date and help will be
  115.   printed, and ship will exit (the rest of the command line is ignored).
  116.  
  117.   Acknowledgements:
  118.  
  119.   The hard-arithmetic coding algorithm was blatantly stolen from Peter
  120.   Gutmann's pgencode/pgdecode programs posted on comp.compression, with
  121.   modifications to use 86 instead of 94 characters, and to make zeros encode
  122.   better than, rather than worse than other bytes.  (As Stravinsky once said:
  123.   "Mediocre composers plagiarize.  Great composers steal.")
  124.