News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

uuencode base64 vs standard uu encoding

Started by Magnum, June 13, 2015, 01:36:16 PM

Previous topic - Next topic

Magnum

QuoteUuencode reads file (or by default the standard input) and writes an encoded version to the standard output. The encoding uses only printing ASCII characters and includes the mode of the file and the operand name for use by uudecode. If name is /dev/stdout the result will be written to standard output. By default the standard UU encoding format will be used. If the option -m is given on the command line base64 encoding is used instead.
What is the difference between the UU encoding format and base64 ?

Is one smaller or more universal ?
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

FORTRANS

Hi,

   UUENCODE is one of a few BASE64 encodings.  XXENCODE is a
newer encoding, and probably what is reffered to in that quote.  And
there are "old" and "new" versions of UUENCODE for that matter.

   UUENCODE translation table.

;2 Translate table updated 17 January 1996 as per "Serial Protocals"
;2 'Space was used in old UUDECODEs as encoded zero', (to 0 from -2)
; -1 special indicator, -2 error
;               0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
XLATTBL DB     -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -2, -2, -1, -2, -2
        DB     -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -2, -2, -2, -2, -2
        DB      0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15
        DB     16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31
        DB     32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47
        DB     48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63
        DB      0, 29 DUP(-2),  0, 129 DUP(-2)


   XXENCODE table, also used as Mime BASE64.

;3 Translate table changed, numbers and letters
;3 Mime Base64 encoding.
; -1 special indicator, -2 error
;               0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
XLATTBL DB     -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -2, -2, -1, -2, -2
        DB     -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -2, -2, -2, -2, -2
        DB     -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, 62, -2, -2, -2, 63
        DB     52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -2, -2, -2, -1, -2, -2
        DB     -2,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14
        DB     15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -2, -2, -2, -2, -2
        DB     -2, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40
        DB     41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -2, -2, -2, -2, -2
        DB    128 DUP(-2)


   The above translate ASCII characters to numbers 0 to 63.  You
then use those to recreate the base 256 bytes that make up the
data.  Four characters in, three bytes out.

HTH,

Steve N.