Path: utzoo!mnetor!uunet!husc6!bloom-beacon!mit-eddie!uw-beaver!tektronix!reed!kamath
From: kamath@reed.UUCP (Sean Kamath)
Newsgroups: comp.sys.apple
Subject: Re: uuencode/uudecode anyone? (was: GS Programs. . . Please!)
Message-ID: <9233@reed.UUCP>
Date: 7 May 88 22:27:25 GMT
References: <9165@reed.UUCP> <537@n8emr.UUCP> <9621@agate.BERKELEY.EDU> <790@trwcsed.trwrb.UUCP>
Reply-To: kamath@reed.UUCP (Sean Kamath)
Organization: Reed College, Portland OR
Lines: 61
Keywords: keywords

In article <790@trwcsed.trwrb.UUCP> arenberg@trwcsed.UUCP (Jeff Arenberg) writes:
>  The code is very short and
>pretty simple, but it uses Unix file commands, so rewriting it to use prodos
>and presumably the Basic interface would take a little work.  I'm curious
>is anyone would like to see this as a utility.  I haven't had any problems
>with Executioner.  If anyone has any real good reasons why uuencoded
>material is better, please speak up.
>
>Jeff Arenberg

The heart of the UU(en/de)CODE routine is:

#define ENC(c) ((c) ? ((c) & 077) + ' ': '`')

What this does is basically a three to four byte conversion, or six bit
packing.  It does not try to do anything funky, it just makes *every* byte
readable as ascii.

No, using uu(en/de)code is nice, but it still puts out all the nasty
characters that BITNET bites on.  Really.

No, as for why I know all about this...I'm writing a program I am calling
apencode.  It will do A) self-execing files B) do try UNIX UU(en/.de)CODE
from a file, and C) Ziff whatever packing used by .GIF and compress on our
vax. . .

Now, as for when this is going to appear.  I already have a very simple
routine that does A) under dos 3.3 I will start with DOS 3.3 for my own
reasons. . . The last thing I will do with bee the Zwhatever compression, as
I don't have an "reasonable" docs on how to do it. . . Just a bunch 'o
undocumented C code. . .

I expect to have something to post n a few weeks. . .

To give you an idea about how I will pack files. . . They will all be packed
with 6 bit packing, withh all characters being mapped to something I hope is
readable. . . This means just about no characters other than A-Za-z.  I do
need about 16 chars, which I will use 0-9 and some other chars, and I am
hoping to get back from Larry a list of death chars, so that I can avoid
them.

When I add packing, I will pack the file first, then encode it.  Depending
on how hard it is to do this, I may break it into two separate steps. . .

When I move it to ProDOS, it will run virtually the same, but when you try
to exec the packed file under the wrong dos, it will laugh at you. . .Well,
OK, it'll cry.

If *anyone* has anything to say about how this is going to work, please
e-mail me a note, do not post it.

I am doing it entirely in assembly, but if someone wants me to download the
C code and put it on the apple (for uu(en/de)code) I will, and I'm sure it
will work just fine, as Aztec does things right, unlike APW C.

Sean Kamath
-- 
UUCP:  {decvax allegra ucbcad ucbvax hplabs ihnp4}!tektronix!reed!kamath
CSNET: reed!kamath@Tektronix.CSNET  ||  BITNET: reed!kamath@PSUVAX1.BITNET
ARPA:  reed!kamath@PSUVAX1.CS.PSU.EDU
US Snail: 3934 SE Boise, Portland, OR  97202-3126 (I hate 4 line .sigs!)