Contents | < Browse | Browse >

                            UUEncoding/Decoding
                            ~~~~~~~~~~~~~~~~~~~
             (thanks to Bob Tomasevich for the quick tutorial)

What is uuencoding and uudecoding?
----------------------------------
uuencoding is converting a binary file into text (ASCII) which can be sent
through mail or Usenet.  uudecoding is reversing the process (e.g.
converting the file back to binary).

Why would I want to do this?
----------------------------
You have to send a binary file to a user who does not have FTP access, or
the user is too lazy to FTP the file.

What is the normal procedure?
-----------------------------
1. Convert the binary file into ASCII, using uuencode.
2. Send the file, through email, to the user.
3. The person on the receiving end gets the email, which may be split into
   parts.  If the email is split into parts, the parts must be combined,
   in the order received, into one file.
4. Receiving person converts the file back into binary, using uudecode.

What does a uuencoded file look like?
-------------------------------------
The start always has:

    begin 644 <encoded file's name>

So, for the file happy-happy-joy-joy.txt, it would look like:

    begin 644 happy-happy-joy-joy.txt

The encoded file begins right after:

M1TE&.#=A@`+@`9<````$`*QB15=2.+&/@R(Y)XM8.=J]H+*%7BL6#8]F6EP_]
M*$=E5"L?L-Z8A-:#60@$,9P27-4-YB#;4HY)U!L9KZNEO"O["#;8]82SDF>
M&[%J4FI',.&:E`48#="4@SE41M61<R`@%R$,9:.?&!Z=NWM_V';H-D1TI`=

.. more lines like the above ..

M>(`)N(`-^(`1.($5>($9N($=^($A.((E>((IN((M^((Q.(,U>(,YN(,]^(-!+
&V""`@`[&
``
end              <-- the end of the encoded file
size 151341      <-- size of the original file

So, how would I do this on the Amiga?
-------------------------------------
There are many uuencode/decode variants out there, but most usually have
kept the old UNIX command line, which can be confusing to novices, or,
require you to remove all mail headers and other, non-uuencoded text.

Luckily, Asher Feldman took the time to write UUxt.

What is UUxT?
-------------
It is a program which performs both the uuencode/decode operations in one
executable, AND, can also pack/unpack LhA archives.

Tell me more.
-------------
The UUxT archive contains UUxT, the CLI version, and UUxtGUI, the Workbench
interface.  I will give a short summary of how to use both.  Detailed
instructions are included in the UUxT archive.

CLI Version:
------------

  Running UUxT without any options gives the following:

     UUxT Version 2.1a Copyright (c)1993 Asher Feldman
     USAGE: UUxT [option] [archive name] <LhA archive name> <file(s)>
     options: a - encode           l - LhAencode
              x - decode           u - LhAdecode

  showing the format of the command line and the valid options.

  Some example command lines:

  1. Normal encoding - UUxt a filename.uue filename-to-archive
  2. Normal decoding - UUxt x filename.uue
  3. LhA archiving and encoding -

            UUxT l filename.uue filename.lha file1 file2 ...

  4. Decoding and LhA unarchiving - UUxT u filename.uue

  For LhA encoding and decoding, you will need LhA by Stefan Boberg.

  Workbench (GUI) Version:
  ------------------------
  Below is a ASCII rendition of the UUxT-GUI window (from UUxtGUI doc):
         ____________________________________________________________
        |+| UUxT-GUI Frontend v1.0 (c)1993 Asher Feldman             |
        +------------------------------------------------------------+
        |   ______________________        ______________________     |
        |  |InFile |              |      |OutFile|              |    |
        |  +-------+--------------+      +-------+--------------+    |
        |    (1)          (2)               (3)         (4)          |
        |             ____________                 _____________     |
        |  Operation |@| Decode   |      Lha Name |             |    |
        |            +-+----------+               +-------------+    |
        |                  (5)                          (6)          |
        |                         _________                          |
        |                        |  START  |                         |
        |                        +---------+                         |
        |                            (7)                             |
        +------------------------------------------------------------+

  (1) Clicking on this brings up a requester to select the file you want to
         perform the operation shown in gadget (5).
  (2) You can manually type here the filename of the file affected by the
         operation indicated in gadget (5).
  (3) Used only for encoding, brings up a requester to select where the
         encoded file should go.  Selecting an existing file will cause the
         existing file to be replaced by the encoded file.  You can also
         use this requester to create directories.
  (4) You can manually type the filename of the file to be the encoded file.
  (5) The operation to perform on file shown in (2).  The operations are
         the four provided by UUxT (uuencode/uudecode/LhAEncode/LhADecode).
  (6) The name of the archive created with the LhAEncode option.  Ignored
         when any other operation is selected.
  (7) Does the encode/decode/LhAEncode/LhADecode and pops up a requester
         indicating if the operation was successful or not.

I need this!  Where can I get it?
---------------------------------
If you use the Internet from a local BBS, you may find it there.  If not
you can FTP it from wuarchive.wustl.edu, in the directory

                          pub/aminet/arc/UUxT.lha

It should also be on the Aminet mirrors.

Thanks for the explanation!  How can I reach you if I have questions?
---------------------------------------------------------------------

                                 Internet
                                 --------

                         bob.tomasevich@nezuld.com
                               bobt@ais.net