home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / atari / 8bit / 5624 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  2.9 KB

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