Xref: utzoo comp.binaries.atari.st:619 comp.sys.atari.st:17931 Path: utzoo!attcan!uunet!cs.utexas.edu!usc!apple!sun-barr!newstop!sun!grapevine!panarthea.sun.com!koreth From: koreth%panarthea.ebay@sun.com (Steven Grimm) Newsgroups: comp.binaries.atari.st,comp.sys.atari.st Subject: v06INF3: How to retrieve and unpack binaries articles Message-ID: <33927@grapevine.uucp> Date: 22 Jul 89 17:54:29 GMT Expires: 21 Aug 89 17:54:29 GMT Sender: news@grapevine.uucp Reply-To: koreth%panarthea.ebay@sun.com (Steven Grimm) Followup-To: comp.sys.atari.st Organization: Sun Microsystems Federal, Milpitas, CA Lines: 256 Approved: koreth%panarthea.ebay@sun.com HOW TO UNPACK ARTICLES FROM COMP.BINARIES.ATARI.ST by Steven Grimm Last update: July 13, 1989 _1. _W_h_a_t _a_r_e _b_i_n_a_r_i_e_s? Binaries are files that contain information other than normal text. Usually, a binary that is posted to the net will contain executable (program) files. Binaries are dis- tinct from _s_o_u_r_c_e_s, which are the human-readable text files that are interpreted by a computer and used to produce binaries. Sources can be modified with relatively little effort, and are usually pretty easy to read. Binaries are not intended to be viewed by a human. _1._1. _U_u_e_n_c_o_d_i_n_g The programs which transfer network news messages (and electronic mail) are not always capable of handling a pure binary file. They are designed to handle textual messages, and the odd symbols and characters in a binary cause them to become confused, and often to mangle the binaries. To avoid this problem, a method called _u_u_e_n_c_o_d_i_n_g is used. Uuencod- ing translates a binary file into text characters, so that the news and mail transport programs won't mess up. The disadvantages are that uuencoded files are about 30% bigger than the raw binary files they represent, and that you have to go through one extra step to get the binaries to work on your computer. _1._2. _A_r_c_h_i_v_e_s _o_r "_a_r_c _f_i_l_e_s" Usually, a program will need more than one file to work properly. The extra files might be data files, help files, or maybe some instructions for the user. In order to easily package multiple files together in one binary file, a pro- gram called "arc" (short for "archiver") is used. Arc also compresses all the files as it packages them, so that the arcfile take up less disk space (and takes less time to download!) than it would if its contents were just thrown together. To confuse matters even more, a new archive program called "zoo" can also be used to achieve the same effect. Zoo is superior to arc in some respects, slightly inferior in others. Unfortunately, you can't unpack a zoo archive with arc, or vice versa. Unpacking Binaries -2- _1._3. _U_S_E_N_E_T _a_r_t_i_c_l_e_s The USENET has groups designed especially for transmis- sion of binary files. They are usually called something like "comp.binaries.x," where x is the type of machine that the programs will run on. For Atari ST owners, the group to watch is comp.binaries.atari.st. Most of the binaries groups (including the Atari binaries group) are _m_o_d_e_r_a_t_e_d, which means that you can't send a program directly to every- one on the network. Instead, you send it to someone in charge of the group (the _m_o_d_e_r_a_t_o_r), who makes sure that your program works and contains the proper documentation (or that the lack of documentation is announced), and that it's in the correct format to be sent out to the rest of the USENET. One of the restrictions of the USENET is that articles can only be a certain length. If a binary is longer than that, it must be split up into several parts, each no longer than 45000 bytes or so. This introduces yet another obsta- cle to people who want to transform the articles into a use- ful form, but it can't really be helped until the USENET starts running much more advanced news transmission software. USENET binaries are grouped into _v_o_l_u_m_e_s, each contain- ing about 100 articles. This is to make life easier for people who are trying to keep track of which articles have been posted. When a new volume is started, the moderator will usually post introductory articles, including a list of previously published articles. _2. _H_o_w _d_o _I _g_e_t _b_i_n_a_r_i_e_s? There are two ways to get binaries: first, by reading the USENET newsgroup comp.binaries.atari.st; you will see new articles within a week (usually much less) of the time they were sent out by the moderator. If, for some reason, your site doesn't receive comp.binaries.atari.st, or if you want to look through previously posted articles, site panarthea.ebay.sun.com has all the binaries stored in its archives. The other way to get binaries is to request them from panarthea's archive server. The archive server is a program that intercepts incoming mail messages and looks for com- mands inside them. You can tell it to list the available binaries, give you help, or send whichever files you're interested in. The requested files will be mailed to you. To find out more about the archive server, send a mail message containing the word "help" to archive- server%panarthea.ebay@sun.com Talk to an administrator at your site if that mail address doesn't work. If you don't Unpacking Binaries -3- get any response from the archive server within a few days, something may be wrong; mail archive- manager%panarthea.ebay@sun.com to report the problem. There are other archive sites, too, such as terminator.cc.umich.edu; they contain most of the comp.binaries.atari.st software as well as some additional programs that have not appeared on the newsgroup. (Some sites, such as terminator, also offer something called "anonymous ftp" if you're on the Internet. Say "ftp terminator.cc.umich.edu", and if you connect, use "anonymous" for a username, and your username for a pass- word. See the ftp documentation at your site for more information.) _3. _H_o_w _d_o _I _d_e_c_o_d_e _t_h_e _b_i_n_a_r_i_e_s? As stated above, turning binaries from USENET articles into a more useful form can be a multi-step process. At the least, you will need the uudecode program; it is standard software on most UNIX|- systems and is available in a couple of forms on the Atari. Versions for other operating systems do exist, and can certainly be written with little effort. Arc is available for UNIX and other operating systems, but is not standard software. In any case, you will want at least arc on your Atari. A version of uudecode written in ST BASIC is available in panarthea's archives (see above). It is in volume 1 of the comp.sources.atari.st directory (note that that's _s_o_u_r_c_e_s and not binaries). Once you have that, you should get the files "arc," "arcdoc," and "uucode" from volume 1 of the binaries directory. They contain the arc program men- tioned earlier, its documentation, and a much better, faster version of the uudecode program. Use the BASIC program to uudecode the two encoded files; then use arc to unpack the better version of uudecode. (Arc is documented in "arcdoc.") Note that if you're reading news/receiving mail on a computer (such as a UNIX system) that already has uudecode, you can skip most of this; you will probably just want to uudecode arc there, then download it (using kermit, xmodem, or your favorite transfer protocol - consult your site's administrator and your Atari communication package's documentation for more information. Remember to use binary mode when downloading arc files!) So far, everything has been small enough to fit in one piece, but you will almost certainly want to try something larger eventually. The Atari "uud" program (whose source _________________________ |- UNIX is a trademark of Bell Laboratories. Unpacking Binaries -4- code, also suitable for compilation on UNIX systems, is available in the sources archive) is capable of easily decoding multi-part uuencoded files. Near the top of each part (except the first) will be a line like begin part c foobar.uac Rename each file (except part 1, which can be named "part01" or just about anything else) to the name at the end of this "begin" line, in this case "foobar.uac". Then run uud on the file containing part 1; it contains instructions to cause uud to look for the other parts. If you have a text editor or a UNIX style cat program, you can just stick all the parts together in order and run uud on the resulting (big) file; it will try to go on in the first file if it can't find the next part in a separate file. If you don't have uud or would prefer to decode your binaries on your larger news computer, the procedure is somewhat more complex. Plain vanilla uudecode doesn't know about multi-part uuencoded files, so you have to fool it into thinking that everything is in one part. First, stick all the parts together (using cat on UNIX). Edit the resulting file. Now remove all the extraneous lines of text in between the parts -- this includes mail headers, any text, lines of the form "include foobar.uad," "table" lines and the lists of characters following them, and "begin" lines other than the one at the beginning of part 1. Once you have converted all the parts into a big uuencoded mass (with no blank lines!), the regular uudecode program will work. Obviously, this is something of a hassle, and the recommended procedure is to try to install uud on your large computer. You'll usually want to minimize the amount of data you have to send to your Atari, since you'll most likely be downloading it at a relatively low speed, and the uudecoded .arc file is the smallest thing you can download. Zoo is available from the archives. It is simple to use; refer to the documentation included in zoobin.arc (yes, you need to use arc to extract zoo!) for more information. The uudecoding process is the same for zoo and arc files. Most archives contain documentation; refer to the instructions in a specific program for usage information and the like. If you have problems with a particular program, send mail to the submitter (listed near the top of each part.) The moderator doesn't have time to become very fami- liar with all the programs that are posted, so the submitter will probably be much more helpful.