home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / atari / 8bit / 5706 < prev    next >
Encoding:
Internet Message Format  |  1992-12-26  |  2.7 KB

  1. Path: sparky!uunet!portal!cup.portal.com!Chris_F_Chiesa
  2. From: Chris_F_Chiesa@cup.portal.com
  3. Newsgroups: comp.sys.atari.8bit
  4. Subject: Re: My ego VS UUE
  5. Message-ID: <72423@cup.portal.com>
  6. Date: Sat, 26 Dec 92 01:23:01 PST
  7. Organization: The Portal System (TM)
  8. References: <71961@cup.portal.com> <kJ98VB2w165w@cyberden.sf.ca.us>
  9. Lines: 44
  10.  
  11. Oops... sorry about that partial posting!  It's 4AM and I'm on an unfamil-
  12. iar keyboard...
  13.  
  14. I was starting to say:
  15.  
  16. First, Rick, standard UUencode takes 3 bytes of 8-bit "original" data
  17. (24 bits) and reorganizes it as 4 6-bit "encoded" quantities (also 24 bits).
  18. Current computer architectures require an entire 8-bit byte to store any
  19. less-than-8-bit quantity, hence a UUencoded file has essentially 4 bytes
  20. for every 3 in the original: an "expansion factor" of 1.3333...., not 1.5.
  21. Among other things, this reduces the advantage of your proposed base-85
  22. technique from "a significant improvement over UUencode," to "just slightly
  23. better," and since base-85 doesn't correspond exactly to a power of 2,
  24. i.e. to a particular, fixed number of bits in the UUencoded values, your
  25. encoding algorithm would of necessity be somewhat messier than UUencoding
  26. which can be implemented just by moving bytes around: NO MATH is needed
  27. for UUencoding.
  28.  
  29. Second, the use of 6 bits for UUencoded data values yields, of course,
  30. 64 different possible values.  As noted in previous articles in this 
  31. thread, the values 0-31 would be control characters, some of the very 
  32. values it is desired to avoid in an e-mailed file, so the UUencode algo-
  33. rithm adds a "bias" value of 63 decimal, shifting the UUencoded values
  34. to the range 63-127 decimal, representing ASCII characters "!" through
  35. "~".  These are ALL "printable" characters, in ASCII anyway.  I don't
  36. think it should be the encoding program's responsibility to deal with
  37. ASCII-to-EBCDIC translation peculiarities; that is the responsibility
  38. of file-exchange software: the ASCII-file-reading program on the EBCDIC
  39. system, or the EBCDIC-file-reading program on the ASCII system.  These
  40. exist and have been refined over the years to quite a high state...
  41.  
  42. Third, I think it would still be interesting to see a base-85 file-
  43. encoder, at least as proof that it could be made to work.  I don't
  44. expect it would make any significant impact on the near-universal
  45. use of the existing UUencode scheme, since UUencode is firmly estab-
  46. lished and the base-85 encoder would be more complex, and therefore
  47. somewhat slower, than an equivalent (whatever THAT means) UUencoder,
  48. for only about a 8% improvement in file size.  Of course, there will
  49. be that minority (possibly including me myself) to whom even an 8% 
  50. improvement will be worth a loss of speed, and such people ought 
  51. to have the choice.
  52.  
  53. Chris Chiesa
  54.   Chris_F_Chiesa@cup.portal.com
  55.