home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!portal!cup.portal.com!Rick_Michael_Cortese
- From: Rick_Michael_Cortese@cup.portal.com
- Newsgroups: comp.sys.atari.8bit
- Subject: Re: My ego VS UUE
- Message-ID: <71961@cup.portal.com>
- Date: Fri, 18 Dec 92 08:56:15 PST
- Organization: The Portal System (TM)
- References: <71950@cup.portal.com>
- Lines: 41
-
- Whoops! Embedded control characters in the 1st message. Sorry, I'll
- try again:
- You know, I hate UUENCODE. Just went through about 1/2 dozen D/Ls just
- to get good copies [ATARIO.PAS, ATARIO.ASM, & UTIL.C]. Turns out I
- don't have the Microsoft Macro Assembler & my version of Turbo Pascal
- seems to choke on the Pascal code. I'm not a Pascal weenie, just
- Action! & some 'C kind'a weenie. Punch line: It doesn't look like
- I'll get around to writting a enhanced density (128 byte sector)
- transfer utility any time in the near future. You know, this is why I
- always have trouble getting things done. While I was resting after
- splurging a months supply of free time trying to get the damm UUE
- stuff working (& because I have to send out some files/Bill mentioned
- he would like to try an encoding scheme/etcetera) it dawned on me.
- Most of the UUE files are at least 1.5 times bigger then the source
- file! A bit of math is in order for people like me that forget
- something right after you learn it. The number you can express in any
- number system is just the sytem base raised to the number of digits
- you're willing to use i.e. 4 hex digits like $FFFF is the same as 16^4
- (well... -1 really since in decimal $FFFF=65535), four base 10 digits
- =>10^4-1 or 9999. OK, here's where the tricky part comes in. We
- UUENCODE all this stuff because we can only transfer ASCII text, but
- ASCII text can be anything <128 and should be greater then 32 <space>
- since some systems may not allow padding lines with spaces. Just
- because I use an 8-bit doesn't mean I've stopped thinking. What you
- need is an ASCII representation of a binary (0-255) file. It works out
- perfectly that if you take a 4 byte slice of a binary file, it can be
- repesented by a 5 digit base 85 number, with a little change <grin>.
- If you just use the ASCII characters [!,...v] to represent a number
- base [0,...85] you can do a straight 4 digit base 256 to 5 digit base
- 85 number conversion of a binary file. First, let me warn you that I
- don't have a calculator with 10 digits of accruacy handy so all number
- here will be off until I write my own routines or buy a good
- scientific calculator. Take as the four byte sequence 255, 255, 255,
- 255 ( =>255*255*255*255) in a file, it can be expressed as vvvvQ
- ( =>85*85*85*85*81). Something like 0, 0, 0, 1 would just be !!!!".
- In other words, all this UUE can be improved from bumping the files to
- 1.5 times their original size, to only 1.25 maximum. I haven't really
- done more then small basic program to test it out. I guess what I'm
- looking for is someone to pick the idea apart so if I'm wrong I won't
- waste a lot of time cruching code. Does anyone see a fatal flaw in
- this thing or am I right?
-