EMUSIC-L Digest Volume 42, Issue 07 This issue's topics: Zip/UUENCODE Blues (5 messages) Your EMUSIC-L Digest moderator is Joe McMahon . You may subscribe to EMUSIC-L by sending mail to listserv@american.edu with the line "SUB EMUSIC-L your name" as the text. The EMUSIC-L archive is a service of SunSite (sunsite.unc.edu) at the University of North Carolina. ------------------------------------------------------------------------ Date: Wed, 1 Jul 1992 13:54:27 CDT From: Phantom Tryke <"guinan::kummer"@KIRK.MSOE.EDU> Subject: Zip/UUENCODE Blues Last week I requested some source code for a MIDI library and received it in my mailbox in a zip format. However, when I extract the file (without the header) and download it to my PC for decompression, pkzip complains that there are no files in the archive. Pkzipfix has no effect. Can anyone explain to me the strategy for recovering information sent in zip format through e-mail? What am I doing wrong? Phantom Tryke, Dreaming of Finland... kummer@kirk.msoe.edu ------------------------------ Date: Thu, 2 Jul 1992 23:16:11 GMT From: Hendrik Jan Veenstra Subject: Re: Zip/UUENCODE Blues Phantom Tryke <"guinan::kummer"@KIRK.MSOE.EDU> writes: >Last week I requested some source code for a MIDI library and received it in my >mailbox in a zip format. However, when I extract the file (without the header) >and download it to my PC for decompression, pkzip complains that there are no >files in the archive. Pkzipfix has no effect. >Can anyone explain to me the strategy for recovering information sent in zip >format through e-mail? What am I doing wrong? Yeah, here we meet again... A dumb remark to start with: did you properly uudecode the file first? (OK, I know... but I've seen people try to unzip a uuencoded file, so it's not *that* idiot...:). Second: maybe the archive contains some included directories and your pkzip can't handle that. Third: dunno. I could try to send the stuff again - as a 'flat' (i.e. no dirs) archive. Fourth: you *did* transfer it to your PC as a *binary*, didn't you? Fifth: someone else any clues? Sixth: whenever you've got problems with stuff I sent you, feel free to write me (although I'll be off for a holiday within a few days :) Is this any help...??? Hendrik Jan -- Hendrik Jan Veenstra - Department of Philosophy University of Utrecht - The Netherlands USENET: hjv@phil.ruu.nl ------------------------------ Date: Sun, 5 Jul 1992 09:51:29 CDT From: Phantom Tryke <"picard::kummer"@KIRK.MSOE.EDU> Subject: Re: Zip/UUENCODE Blues Hendrik Jan writes: >Yeah, here we meet again... A dumb remark to start with: did you properly >uudecode the file first? (OK, I know... but I've seen people try to unzip a >uuencoded file, so it's not *that* idiot...:). Second: maybe the archive >contains some included directories and your pkzip can't handle that. >Third: dunno. I could try to send the stuff again - as a 'flat' (i.e. no dirs) >archive. Fourth: you *did* transfer it to your PC as a *binary*, didn't you? >Fifth: someone else any clues? Sixth: whenever you've got problems with stuff I >sent you, feel free to write me (although I'll be off for a holiday within a >few days :) Thank you very much for your patience and your helpful response. I am quite new to INTERNET and am just now becoming aware of some of the details involved in e-mail transfer. My problem is that I don't understand UUENCODE/UUDECODE (I did in fact attempt to unzip the file uuencoded, smart eh?). So, perhaps someone can help me out with this encoding scheme so that I can get with the program. What is it? Where can I get the tools to encode and decode files? And, Hendrik Jan, if you read this before you go on vacation, I hope you have a great time! I will leave you some mail with some feedback about your MIDILIB after I figure out these last few details. Phantom Tryke, Dreaming of Finland... kummer@kirk.msoe.edu ------------------------------ Date: Sun, 5 Jul 1992 22:12:40 GMT From: Hendrik Jan Veenstra Subject: Re: Zip/UUENCODE Blues Phantom Tryke <"picard::kummer"@KIRK.MSOE.EDU> writes: >My problem is that I don't understand UUENCODE/UUDECODE (I did in fact attempt >to unzip the file uuencoded, smart eh?). grin... ;) >So, perhaps someone can help me out with this encoding scheme so that I can >get with the program. What is it? Where can I get the tools to encode and >decode files? There are uuen/decoders for (almost?) every platform, so it depends on the machine you're using. All Unix machines got uue and uud. Just type 'uud ' or 'uudecode . Uue/d for the atari can be found at atari.archive.umich.edu (FTP) in the directory atari/archivers as uucode10.arc (or .zoo or .lzh - don't remember). As for PCs - I don't know, but you could ask the ARCHIE database - search for uue/uud/uux/uucode or something like that. Oops, if you're new to the net, I suppose you don't know how archie works... Maybe someone at your site can explain this to you (or someone in this group). BTW, as a 'newcomer' you should try to get hold of a copy of 'Zen and the art of the internet' - a very good basic tutorial/introduction to all the internet services (email, netnews, ftp, telnet, archie, listservs, etc). Electronic copies are available at various locations, I think. Maybe someone else knows where... A bit more on uuencode/decode: uuencode is a program that converts/codes files (such as binaries) to an 'all ASCII'-file, so that they can be transfered over (through???) the net. I'm no expert, but I've understood the net uses only 7 bits instead of 8, so uue codes three 8-bit bytes into 4 7-bit bytes (=ascii) (plus some checksum bytes and other 'control' stuff). Uudecode of course does the reverse. If you look at a uuencoded file you'll see it's all printable characters, as opposed to a binary (e.g. program-) file. >And, Hendrik Jan, if you read this before you go on vacation, I hope you have >a great time! I will leave you some mail with some feedback about your MIDILIB >after I figure out these last few details. Yes, I did :) It's sunday night/monday morning - two days to go before leaving. And it's not *my* midilib - I got it from the net somewhere... But I'd be interested in any comments anyhow, so I'm looking forward to your mail. Hope you get it all unpacked and working. >Dreaming of Finland... Dreaming of Scotland - and two more days before *my* dreams become reality :) Hendrik Jan -- Hendrik Jan Veenstra - Department of Philosophy University of Utrecht - The Netherlands USENET: hjv@phil.ruu.nl ------------------------------ Date: Mon, 6 Jul 1992 10:49:00 EDT From: RAY BROHINSKY Subject: Re: Zip/UUENCODE Blues THIS IS FAIRLY LONG...IF YOU ALREADY KNOW ABOUT UUENCODE/UUDECODE, skip this message! Because there have been some troubles with internet transfers of binary files, I'm cobbling up a quicky message here to help: **Warning: this is a long message**, **Warning: this message is specific to PC/MSDOS!** I'm sure that there are other systems that people might want to do this sort of thing for, and I'll include some info at the end. UUencoding is done so that binary files (which contain byte values 0 to 255 decimal) can be sent through the internet and other mail systems, which only respond well to text files. In text files, the byte values below 32-or-so have special meanings. For instance, 12 may be an instruction code in a binary file, but it causes a form feed in a text environment. There are other codes which stop information transfer (like X-on and X-off) or do other things like mark the end of a file, which can exist in binary files, and _should be there_. The secret to getting these files through the nets is to encode them, so that a control code doesn't appear to the system as a control code. The simplest form (although not the most efficient) is to translate each byte into its hexidecimal equivalent, and send a text file containing a list of the equivalents. Once received, this file must be translated back into binary. There are a number of accepted methods to do this, and the most common seems to be UUENCODE/UUDECODE. I can't describe the exact actions taken by a UUDECODE program when it translates binary files into text files, but I can summarize: the uuencoded file contains information about the original file name, the size of the original file, and a checksum (usually) that can be calculated from the original file's contents. This checksum will be used to verify that the entire file has been received correctly. Each line of text, converted from some binary bytes, also contains a checksum, so that the UUDECODE program can ensure that it is tracking properly on a line-by-line basis as it rebuilds the original file in the new location. The uuencoded file contains no non-text characters, other than carriage returns (and/or line feeds, depending on your system) The hardest part of using UUDECODE/UUENCODE programs is getting them. This is not really very difficult. Since PC's of the MS/DOS variety are becoming all pervasive, I've included a simple UUDECODE program, which I got from WSMR-SMTEL20.ARMY.MIL, indirectly through wuarchive.wustl.edu. This is a basic program which will create a uudecode.com binary in the same directory as this program is loaded into basic or abasic (or gwbasic or qbasic!) and run. I've lost the uudecode.doc file. That's not much of a problem: to use the uudecode.com file, move it into your path and type uudecode where is the name portion of your uudecoded file. For midilib.uue, you'd use uudecode midilib (So it is worth the trouble to rename files that contain uudecoded information to .uue). Note, however, that files you recieve by mail will have headers and may have `front matter' like discriptions, comments, and other things. You generally have to trim these files to the beginning of the actual uuencoded section, and should also trim off anything after the end of the uuencoded section. Also, this file will not handle uuencoded files that are broken up...you'll have to join them together. It is easy to tell where they begin and end, though, since those are exactly the words used. For instance, a certain .uue file I have hanging around looks like this at the first and last lines: begin 644 uudecode.exe . . . end sum -r/size 247/44586 section (from "begin" to "end") sum -r/size 40489/31824 entire input file anything before or after these lines should be removed. (I'm not sure whether it'll hurt if you remove the check sum lines after the end line, but I know they won't hurt if you leave them!) However, all is not lost: you can bootstrap yourself into a better uudecode, and then yet a better one... To do this, simply get something like uud317.zip mailed to you in uuencoded form, and decode it using this .com file. Then unzip the archive and replace uudecode.com with the uudecode.exe that comes in it, which is capable of handling multiple files of the form name1.uue, name2.uue, name3.uue, etc without any work on your part: it ignores front matter, looks for more files with numbers, gets them in numeric order and creates the original file from them. UUD317.ZIP is what I mention because it's the last extended uudecode/uuencode archive I got...and that was a few years ago. Check your ftp sites/ mail sites for a newer uudecoder archive. Finally, people using different platforms: there are other .bas files for uudecode programs on the archive sites which will either build a uudecode executable on your machine, or which will uudecode when run in basic. There are also C source files for simple uudecode programs. The whole idea is to start with something simple, get it working, then obtain more complicated decoders in encoded format and work your way up as far as you want (in complexity and automatedness of uudecoders/ encoders). I hope this helps! raybro ------------------------8< cut here! >8------------------------ 100 REM - BASIC PROGRAM TO CREATE UUDECODE.COM v2.0 (a fast uudecoder) 105 REM UUDECODE.BAS created by w8sdz@WSMR-SIMTEL20.ARMY.MIL (Keith Petersen) 110 CLS:PRINT "Creating UUDECODE.COM. See UUDECODE.DOC for instructions." 115 OPEN "UUDECODE.COM" AS #1 LEN = 1 120 FIELD #1, 1 AS A$: CHECKSUM#=0 130 FOR I = 1 TO 73 140 LINESUM#=0: LOCATE 2,3: PRINT "Countdown: " 73 - I ; 150 FOR J = 1 TO 16: READ BYTE$: CHECKSUM#=CHECKSUM#+VAL("&H"+BYTE$) 160 LINESUM#=LINESUM#+VAL("&H"+BYTE$) 170 IF (BYTE < 256) THEN LSET A$=CHR$(VAL("&H"+BYTE$)): PUT #1 180 NEXT J 190 READ LINETOT$: LINECHECK# = VAL("&H"+LINETOT$) 200 IF LINECHECK# = LINESUM# THEN GOTO 220 210 LOCATE 4,2: PRINT "Error in line #" ; 260 + 10 * I: GOTO 260 220 NEXT I 230 CLOSE: READ FILETOT$ : FILECHECK# = VAL(FILETOT$) 240 IF CHECKSUM# <> FILECHECK# THEN GOTO 260 250 PRINT: PRINT "UUDECODE.COM created successfully": SYSTEM 260 PRINT: PRINT "UUDECODE.COM is not valid!": END 270 DATA EB,5F,90,49,6E,70,75,74,20,66,69,6C,65,20,65,72, 6A1 280 DATA 72,6F,72,2E,4F,75,74,70,75,74,20,66,69,6C,65,20, 5F2 290 DATA 65,72,72,6F,72,2E,73,74,61,72,74,20,6E,6F,74,20, 617 300 DATA 66,6F,75,6E,64,2E,45,6E,64,20,6E,6F,74,20,66,6F, 5C7 310 DATA 75,6E,64,2E,20,65,78,69,73,74,73,2E,20,41,62,6F, 595 320 DATA 72,74,69,6E,67,21, 0, 0, 0, 0,AC, 3,AC, 3,5C, 3, 402 330 DATA 0,E8,FA, 1,E8,54, 1,BF,5C, 3,E8,D1, 0,AD,3D,62, 743 340 DATA 65,75,F4,AD,3D,67,69,75,EE,AD,3D,6E,20,75,E8,BF, 87F 350 DATA 5C, 3,B4,20,AC,3A,C4,76,FB,AC,3A,C4,75,FB,AC,3A, 84E 360 DATA C4,76,FB,3A,C4,74, 4,AA,AC,EB,F8,BA,5C, 3,33,C9, 8F9 370 DATA 88, D,80,3E,60, 1,FF,74,1E,B4,4E,CD,21,3C, 2,74, 5E7 380 DATA 16,3C,12,74,12,8B,CF,2B,CA,E8,2F, 1,BA,44, 1,B9, 609 390 DATA 12, 0,B0, 5,E9,16, 1,B4,3C,CD,21,73, 3,E9,E3, 0, 5E7 400 DATA A3,58, 1,BF,5C, 3,E8,65, 0,AC, A,C0,74,48,BB,20, 674 410 DATA 20,2A,C3, A,C0,74,3F,32,E4,8B,E8,B9, 4, 6,AC,8A, 70C 420 DATA E0,AC,8A,D0,2B,C3,D0,E4,D0,E4,D2,E8, A,C4,AA,4D, ABB 430 DATA 74,D4,8A,E2,AC,8A,D0,2B,C3,D2,E4,D0,E8,D0,E8, A, AD8 440 DATA C4,AA,4D,74,C1,8A,E2,AC,2B,C3,8A,CD,D2,E4, A,C4, 9D1 450 DATA AA,4D,75,C7,EB,B0,E8,15, 0,AD,3D,65,6E,75, 5,AC, 7AE 460 DATA 3C,64,74, 3,E8,AE, 0,E8,61, 0,B4,4C,CD,21,8B,36, 6A5 470 DATA 5A, 1,89,3E,5E, 1,BD,50, 0,BF, C, 3,33,C0,AB,B9, 5B3 480 DATA 27, 0,B8,20,20,F3,AB,BF, C, 3,3B,36,5C, 1,72, 6, 4D1 490 DATA E8,38, 0,E8,55, 0,AC,3C,60,75, 4,B0,20,EB, 8,3C, 61D 500 DATA D,74,1B,3C, A,74,18,AA,4D,75,DF,3B,36,5C, 1,72, 4F9 510 DATA 3,E8,37, 0,AC,3C, A,75,F2,BF,5C, 3,EB,B4,46,89, 707 520 DATA 36,5A, 1,8B,3E,5E, 1,BE, C, 3,C3,BA,5C, 3,8B,CA, 5B7 530 DATA 87, E,5E, 1,2B,CA,76, A,8B,1E,58, 1,B4,40,CD,21, 54D 540 DATA 72, 1,C3,BA,14, 1,B9,12, 0,EB,22,BA,AC, 3,B9,54, 653 550 DATA FA,8B,1E,56, 1,B4,3F,CD,21,72, C, B,C0,74, 8,8B, 62B 560 DATA F2, 3,C6,A3,5C, 1,C3,BA, 3, 1,B9,11, 0,50,E8, A, 648 570 DATA 0,58,E9,55,FF,BA,36, 1,B9, E, 0,52,51,BA,3E, 3, 5EB 580 DATA B9, 2, 0,90,E8, C, 0,59,5A,E8, 7, 0,BA,3E, 3,B9, 595 590 DATA 2, 0,90,BB, 2, 0,B4,40,CD,21,C3,90, D, A,54,68, 557 600 DATA 69,73,20,50,72,6F,67,72,61,6D,20,52,65,71,75,69, 5FA 610 DATA 72,65,73,20,44,4F,53,20,56,65,72,73,69,6F,6E,20, 576 620 DATA 32,2E,30,20,6F,72,20,68,69,67,68,65,72,2E, D, A, 46D 630 DATA 24, D, A,49,6E,70,75,74,20,70,61,74,68,2F,66,69, 516 640 DATA 6C,65,3A,20,20,4E,6F,20,61,63,74,69,6F,6E,B4,30, 58A 650 DATA CD,21,3C, 2,73, C,BA, C, 3,B4, 9,CD,21,B8, 1,4C, 524 660 DATA CD,21,E8,46, 0,73,33,BA,68, 4,B9,1B, 1,90,E8,6A, 69F 670 DATA FF,BA,41, 3,B9,14, 0,BB, 2, 0,B4,40,CD,21,BF,7F, 6A7 680 DATA 0,C6, 5,50,8B,D7,B4, A,CD,21,E8,1E, 0,73, B,BA, 667 690 DATA 55, 3,B9, 9, 0,B0, 1,E9,33,FF,BA, 4, 4,B8, 0,3D, 59D 700 DATA CD,21,72, 4,A3,56, 1,C3,E9,1C,FF,BE,80, 0,BF, 4, 726 710 DATA 4,FC,AC, A,C0,74,2F,B4,20,AC,3A,C4,76,FB,3A,C4, 806 720 DATA 76,26,3C,2F,74, 4,3C,2D,75,18,8B,D0,8B, 4,3C,3F, 4DA 730 DATA 74,1B,24,5F,3D,4F,20,8B,C2,75, 7,F6,16,60, 1,46, 53A 740 DATA 46,AC,AA,AC,EB,D8,F9,C3,C6, 5, 0,F8,C3,BA,68, 4, 973 750 DATA E9,66,FF,90,55,55,44,45,43,4F,44,45,20,76,32,2E, 622 760 DATA 30, 0,4F,72,69,67,69,6E,61,6C,6C,79,20,62,79,20, 565 770 DATA 54,68,65,6F,64,6F,72,65,20,41,2E,20,4B,61,6C,64, 565 780 DATA 69,73, 0,54,68,6F,72,6F,75,67,68,6C,79,20,72,65, 608 790 DATA 68,61,63,6B,65,64,20,62,79,20,44,61,76,69,64,20, 583 800 DATA 50,20,4B,69,72,73,63,68,62,61,75,6D,2C,20,54,6F, 588 810 DATA 61,64,20,48,61,6C,6C, 0,55,55,44,45,43,4F,44,45, 4B4 820 DATA 20,5B,2D,3F,5D,5B,2D,6F,5D,20,5B,64,3A,5D,5B,5C, 4C5 830 DATA 70,61,74,68,5C,5D,62,69,6E,61,72,79,2E,55,55,45, 608 840 DATA 20,3C,52,45,54,55,52,4E,3E, D, A,55,73,69,6E,67, 497 850 DATA 20,74,68,65,20,66,69,6C,65,6E,61,6D,65,2E,74,79, 5DD 860 DATA 70,20,69,6E,20,74,68,65,20,22,62,65,67,69,6E,22, 531 870 DATA 20,6C,69,6E,65,2C, D, A,70,72,6F,64,75,63,65,73, 570 880 DATA 20,75,75,64,65,63,6F,64,65,64,20,66,69,6C,65,6E, 600 890 DATA 61,6D,65,2E,74,79,70,20,6F,6E,20,63,75,72,72,65, 5FC 900 DATA 6E,74,20,64,72,69,76,65,5C,70,61,74,68, D, A,28, 564 910 DATA 70,72,6F,76,69,64,69,6E,67,20,66,69,6C,65,6E,61, 661 920 DATA 6D,65,2E,74,79,70,20,64,6F,65,73,6E,27,74,20,61, 5B2 930 DATA 6C,72,65,61,64,79,20,65,78,69,73,74,29,2E, D, A, 53C 940 DATA 2D,6F,20,73,77,69,74,63,68,20,66,6F,72,63,65,73, 5F0 950 DATA 20,6F,76,65,72,77,72,69,74,65,20,6F,66,20,65,78, 5F9 960 DATA 69,73,74,69,6E,67,20,66,69,6C,65,6E,61,6D,65,2E, 61D 970 DATA 74,79,70, D, A,2D,3F,20,70,72,6F,64,75,63,65,73, 565 980 DATA 20,74,68,69,73,20,68,65,6C,70,20,6D,65,73,73,61, 5DA 990 DATA 67,65,2E, D, A,24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135 1000 DATA 114365 ------------------------------ End of the EMUSIC-L Digest ******************************