home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / rxdecode.zip / RxDecode.txt < prev    next >
Text File  |  1993-11-12  |  6KB  |  131 lines

  1. RXDECODE
  2. ========
  3.  
  4. RxDecode was written in REXX and is a program which automatically assembles 
  5. UU-encoded- and XX-encoded-pieces into whole files. While doing that it will 
  6. strip any mail-headers, mail-footers, Unix-shar- and other Unix-scripts. Pieces 
  7. which belong together may be saved into one file, rather than as separated 
  8. files.
  9.  
  10. As it was developed in the course of almost two years, additional logic went 
  11. into the program in order to take into account numerous ways people individually
  12. mark the beginning and the end of UU- and XX-encoded files.
  13.  
  14. As it stands now, RxDecode is capable of automatically assembling 99.5 % of all 
  15. presently existing UU- and XX-encoded files. 
  16.  
  17. In the case that a very exotic manual mark-up of the beginning and ending of 
  18. encoded files were used, RxDecode will issue an error-message and keep the 
  19. original-files and the temporary file which should contain the clean, original 
  20. UU- resp.  XX-encoded content.  Look-up this file, in order to determine what 
  21. went wrong.  In the case of such a rare error, you merely need to clean the 
  22. original pieces manually, as you would do in any case now.
  23.  
  24. UUENCODE and XXENCODE
  25. =====================
  26.  
  27. UUENCODE has roots in Unix and is a way to encode binary files such, that they 
  28. become mailable. This means for instance, that no encoded file will have 
  29. line-lengths larger than 80 characters. In fact a UU- or XX-encoded file has a 
  30. maximum line-length of 61 resp. 62 characters.
  31.  
  32. Each encoded file SHOULD have a translation table, which would allow any 
  33. UUDECODER or XXDECODER to restore the original binary file. Almost all files 
  34. just omit that table. RxDecode tries to determine which encoding type a file has
  35. and inserts the translation table, in case it is missing. Therefore a 
  36. UUDECODE-program is capable of decoding an XX-encoded file ! 
  37.  
  38. The converse is not necessarily true (i.e. a XXDECODing program cannot always 
  39. successfully decode a UUencoded file). The reason for this is the translation 
  40. table, the original UU-schem used: one of the characters is the blank character.
  41. As UUencoded files can be generated that have blanks at the end of a line, some 
  42. mailers just tore those blanks off, in order to save bandwidth in the old days 
  43. ... that really messed things up. Two solutions were found: one was using an 
  44. additional character for the used blank, the other to end each line with a 
  45. non-blank-character (normally a capital M). Now the problem for XXdecoders on 
  46. UU-encoded files which don't have a translation table lies in the simple fact, 
  47. that it is not clear whether a blank or an ` (decimal 96) is used. 
  48.  
  49. For this reason RxDecode analyzes UUencoded files for the usage of `-characters.
  50. If found they will be replaced by blanks, an the original UU-translation table 
  51. will be inserted. Hence XXdecoders can work successfully on UU-encoded files 
  52. too.
  53.  
  54. In principal both, UUENCODE/XXENCODE and UUDECODE/XXDECODE have the same logic 
  55. in encoding and decoding.  They simply differ in the used translation table (the 
  56. original UU-translation-table caused troubles in non-ASCII-character sets, e.g.  
  57. EBCDIC, therefore the XX-translation-table was created).  
  58.  
  59. The principle is simple:  use 64 characters from the base ASCII-set as the 
  60. translation character (you need 6 bits to encode them).  Map 3 regular 
  61. 8-Bit-characters into 4 Bytes such, that only the translation characters are 
  62. used and that one only needs 7-Bit-ASCII-characters to express them (something 
  63. like 11112222B 33334444B 55556666B => 00111122B 00223333B 00444455B 00556666B).  
  64. Indicate with the first character in a line, how many encoded characters will 
  65. follow in that line.  Optionally add a capital M to each line.  
  66.  
  67. Because mailing can be costly, some mailers do not allwo to transport messages 
  68. that have more than let's say 1,000 lines.  As encoded binary files can consist 
  69. of much more than 1,000 lines they are split up into several pieces in order to 
  70. circumvent such a limitation (i.e.  each chunk has less than 1,000 lines).  
  71. Therefore one needs to assemble those pieces and run a decode-program 
  72. thereafter.  You need to either save each part as a separate file and indicate 
  73. it in the extension, e.g.  .UU1, .UU2, .XX1, .XX2 (UU stands for UUencoded, XX 
  74. stands for XXencoded) etc.  or save all the pieces into one file (in the correct 
  75. order !!!).  RxDecode will harvest all saved pieces and join them in its 
  76. processing (removing whatever surrounds the encoded part and doing translations 
  77. where necesseray) in a temporary file, which always starts with the letters 
  78. "tmp" plus the first letter of file-stem of the encoded pieces.  After RxDecode 
  79. regenerated the original encoded file it will start UUDECODE or XXDECODE to 
  80. decode the file into its original state.
  81.  
  82. With this package both decoders are enclosed, which work under DOS too as they
  83. were compiled for FAPI (under OS/2 they are windowable, which means that no
  84. full-screen-switching occurs while decoding).
  85.  
  86.  
  87. Hint
  88. ====
  89.  
  90. You can use RxDecode for decoding binaries which were encoded e.g.  in 
  91. <comp.os2.binaries> or <alt.binaries.pictures.fine-art> etc.  
  92.  
  93.  
  94.  
  95. RxDecode - usage
  96. ================
  97.  
  98. purpose:   concatenates XX- or UU-encoded file chunks and decodes them
  99.            usage:   RXDECODE [X|U] [/B]
  100.  
  101.   option [X|U]: X  ... use XXDECODE to decode UU- and XX-encoded files
  102.                 U  ... use UUDECODE to decode UU- and XX-encoded files
  103.  
  104.   option [/B]:  /B ... show output in black/white (no ANSI-colors)
  105.  
  106. This program decodes XX- or UU-encoded files (even if split), e.g.:
  107.  
  108.     chunks-order in file extension:  
  109.         foo.uu1 foo.uu2 foo.uu3 foo.uu4 foo.uu5 foo.uu6
  110.         foo.uu7 foo.uu8 foo.uu9 foo.u10 foo.u11 foo.u12
  111.  
  112.     chunks-order in file-body:
  113.         foo1.uue foo2.uue foo3.uue foo4.uue  foo5.uue  foo6.uue
  114.         foo7.uue foo8.uue foo9.uue foo10.uue foo11.uue foo12.uue 
  115.  
  116.     normal encoded file:
  117.         foo.xxe
  118.  
  119. It handles XX- and UU-encoded files, removes mail-headers and mail-trailers, 
  120. as well as information supplied by the sender. In addition it takes care of 
  121. newer UU-encoded files which changed the translation-table. Chunks are ordered
  122. in the ascending order implied by the chunks-number (serial-number).
  123. Hint: A 'chunk' may contain several parts of an encoded file.
  124.  
  125.  
  126. 1993-11-12
  127. Rony G. Flatscher
  128. Wirtschaftsuniversitaet Wien
  129. Vienna/Austria/Europe
  130.  
  131.