home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 December
/
simtel1292_SIMTEL_1292_Walnut_Creek.iso
/
msdos
/
filutl
/
toadxx11.arc
/
XXENDEC.DOC
< prev
Wrap
Text File
|
1989-09-16
|
3KB
|
63 lines
Date: Wed, 13 Jul 88 13:39:20 cdt
From: wucs1!wubios!david@uunet.UU.NET (David Camp)
Subject: XXENCODE.C and XXDECODE.C
Here is the source for XXENCODE and XXDECODE, replacements for
UUENCODE and UUDECODE that use a better character set. I use them to
transfer files between VM/CMS and my PC and Unix. They were developed by
Phil Howard <PHIL@UIUCVMD.BITNET>. I adapted them for MS-Dos and VM/CMS.
They are public domain.
Notice that under VM/CMS, these require the Waterloo C compiler. Under
MS-Dos they require the Microsoft C compiler. The usual cc command works
under Ultrix.
*-------------------------------------------------------------------------*
| (314) 362-3635 Mr. David J. Camp |
| Room 1108D ^ Box 8067, Biostatistics |
| 706 South Euclid < * > Washington University Medical School |
| v 660 South Euclid |
| Bitnet: david%wubios@wucfua.wustl Saint Louis, MO 63110 |
| Internet: david%wubios@wucfua.wustl.edu |
*-------------------------------------------------------------------------*
-----xxencode.doc-----
Date: Thu, 9 Jun 88 14:51:50 CDT
Reply-To: "Mark S. Zinzow" <MARKZ@UIUCVMD>
Here is some further information on UUENCODE and XXENCODE.
UUENCODE has both a header to begin a file and identify it's name, and for
UNIX systems (where UUENCODE was designed) to carry the file protection
bits. It also has a trailer to terminate the file decoding so that the
entire coding is bounded from any garbage added by mailers, sign, etc.
UUENCODE uses a set of 64 different non-blank characters to represent each
6 bits. Three binary bytes in sequence is represented by four output
characters. The first character on a line is the number of binary bytes
the rest of that line represents. Each line encodes up to 45 bytes in up
to 60 characters. Any incomplete set of 3 bytes is encoded as 4
characters and the group length truncates the output.
XXENCODE retains all these characteristics, good or bad. They are not
ideal but they are proven to work. It's not the most efficient, but it is
very close to the optimal balance.
Unlike XXENCODE, UUENCODE uses characters where the 6 bits that they
represent form the original binary are the same as the lower 6 bits in the
ASCII code of that character. A straight port of the C source to any
other character set will simply not work at all. Drastic modification can
get it to work, but the problem of incosistent translations seriously
complicates such modified versions.
XXENCODE simply uses the 26 UPPER case letters, 26 lower case letters, the
10 digits, and the characters "+" (plus) and "-" (minus). An assigned
relationship is mapped in the character table in the source code.
By the way, older versions of UUENCODE coded bits 000000 as a blank. The
newer version specially changes that to a different character that also
has 000000 as it's lower 6 bits to it is actually compatible forward and
backwards unless the file goes through a mailer that plays with tab
changes or squishes white space. XXENCODE does not encode any blanks.