home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / roadmap.zip / RMMAP16.TXT < prev    next >
Text File  |  1995-04-12  |  13KB  |  298 lines

  1.  
  2. MAP16: FTP FILE COMPRESSION
  3.  
  4.  
  5.      "Travel is glamorous only in retrospect." -- Paul Theroux,
  6.       quoted in The Observer
  7.  
  8.  
  9. Own a personal computer for any amount of time, and you will quickly
  10. realize that the amount of storage space on your computer is limited.
  11. One way to deal with this problem is to use a compression software
  12. package that "squishes" unused programs into small "boxes", thus
  13. freeing up a little more of your disk space for other programs.
  14.  
  15. It turns out that storage space problems are not limited solely to
  16. personal computers. As the numbers of files that are available
  17. through ftp increases daily, ftp sites are actively looking
  18. for ways to squeeze more files into a limited amount of space.
  19.  
  20. The ftp sites accomplish this by using file compression.
  21.  
  22. The good news is that a compressed file takes up a lot less space
  23. on the ftp site's computer. The bad news is that a compressed file
  24. is absolutely useless until you uncompress it.
  25.  
  26. Wait ... it gets worse. Before you can uncompress a file, you have
  27. to know what compression method was used to compress the file in
  28. the first place. Unfortunately, there is no one standard ftp file
  29. compression method -- there are HUNDREDS of different file compression
  30. methods in use today :(
  31.  
  32. If you have to know what compression method was used before you
  33. can uncompress a file, how are you ever going to figure out which
  34. method was used? Well, it is actually pretty easy:
  35.  
  36.      1. Most ftp directories have a READ.ME file that shows an
  37.         index of all the files that are in that directory. Some
  38.         really nice ftp sites have expanded READ.ME files that
  39.         include a mention about what compression method was used
  40.         and where you can get a free copy of the software needed
  41.         to uncompress the files.
  42.  
  43.      2. Look at the files' extensions. By looking at the extensions
  44.         and comparing them to the chart below, you will be able to
  45.         determine what compression method was used and what particular
  46.         software is needed to uncompress the file.
  47.  
  48. Fortunately, most uncompression software is either public domain (meaning
  49. that it is completely free) or shareware (meaning that you can get a copy
  50. of it for free, but the author expects you to send him some money for the
  51. program if you decide to keep it and use it). Best of all, most
  52. uncompression software is available through ftp! :)
  53.  
  54. The list below shows some of the most popular extensions that you
  55. are bound to encounter during your visits to ftp sites around the
  56. world. It also shows transfer modes needed to retrieve files with
  57. these extensions, what uncompress software package you need to
  58. to uncompress the files after you retrieve them, and it even gives
  59. some additional comments about each of the extensions.
  60.  
  61. Paraphrasing something I said in MAP01, I want you to be aware
  62. that the one compression method that isn't listed below is going
  63. to be the one compression package that you ADORE. Please do not
  64. take this personally. There are literally HUNDREDS of compression
  65. methods in use today, and there is no way that I can list all
  66. of them.
  67.  
  68. SUGGESTION: Save the following list, and use it as a reference tool
  69. for when you encounter an extension that you have never seen before :)
  70. Also, please notice that the following list talks about "archie".
  71. Archie is an FTP search tool that we will discuss tomorrow.
  72.  
  73. -----
  74.  
  75. (the following list was adapted from "The EFF's Guide to the Internet"
  76. by Patrick Crispen)
  77.  
  78. FILE           TRANSFER UNCOMPRESS
  79. EXTENSION      MODE     PACKAGE      ADDITIONAL COMMENTS
  80. ------------   ------   ----------   -----------------------------------
  81.  
  82. .txt or .TXT   ASCII                 By itself, this means the file is
  83.                                      a document rather than a program,
  84.                                      and does not need to be uncompressed
  85.  
  86. .ps or .PS     ASCII                 A PostScript document (in Adobe's
  87.                                      page description language). You can
  88.                                      print this file on any PostScript
  89.                                      capable printer or use a previewer,
  90.                                      like GNU project's GhostScript.
  91.  
  92. .doc or .DOC   ASCII                 Another common extension for text
  93.                                      documents. (Be careful, though: .doc
  94.                                      and .DOC extensions are also used for
  95.                                      Microsoft Word documents (which are
  96.                                      Binary files). The duck theory will
  97.                                      help you determine the difference)
  98.                                      No decompression is needed, unless it
  99.                                      is followed by:
  100.  
  101. .Z             Binary   uncompress   This indicates a Unix compression
  102.                                      method. To uncompress type
  103.  
  104.                                           uncompress filename.Z
  105.  
  106.                                      and hit enter at your host system's
  107.                                      command line.
  108.  
  109.                                      u16.zip is an MS-DOS program that
  110.                                      will let you download .Z files and
  111.                                      uncompress them on your own computer.
  112.                                      The Macintosh equivalent program is
  113.                                      called MacCompress (use archie to
  114.                                      find these).
  115.  
  116. .zip or .ZIP   Binary   PKZip or     This indicates the file has been
  117.                         Zip/Unzip    compressed with a common MS-DOS
  118.                                      compression program, known as PKZIP
  119.                                      (use archie to find PKZIP204.EXE).
  120.                                      Many Unix systems will let you un-ZIP
  121.                                      a file with a program called unzip.
  122.  
  123. .gz            Binary   gunzip       A Unix version of ZIP. To uncompress,
  124.                                      type
  125.  
  126.                                           gunzip filename.gz
  127.  
  128.                                      at your host system's command line.
  129.  
  130. .zoo or .ZOO   Binary   zoo          A Unix and MS-DOS compression
  131.                                      format. Use a program called zoo
  132.                                      to uncompress.
  133.  
  134. .shar or .Shar Binary   unshar       Another Unix format. Use unshar
  135.                                      to uncompress.
  136.  
  137. .tar           Binary   tar          Another Unix format, often used
  138.                                      to compress several related files
  139.                                      into one large file. All Unix
  140.                                      systems will have a program called
  141.                                      tar for "un-tarring" such files.
  142.                                      Often, a "tarred" file will also be
  143.                                      be compressed with the gz method,
  144.                                      so you first have to use uncompress
  145.                                      and then tar.
  146.  
  147. .sit or .Sit   Binary   StuffIt      A Macintosh format that requires
  148.                                      the StuffIt program.
  149.  
  150. .ARC           Binary   ARC or       Another MS-DOS format, which
  151.                         ARCE         requires the use of the ARC
  152.                                      or ARCE programs.
  153.  
  154. .LHZ           Binary   LHARC        Another MS-DOS format; requires
  155.                                      the use of LHARC.
  156.  
  157. "A few last words of caution: Check the size of a file before you get
  158. it. The Net moves data at phenomenal rates of speed.  But that 500,000-
  159. byte file that gets transferred to your host system in a few seconds
  160. could take more than an hour or two to download to your computer if
  161. you're using a 2400-baud modem.  Your host system may also have limits on
  162. the amount of bytes you can store online at any one time.  Also, although
  163. it is really extremely unlikely you will ever get a file infected with a
  164. virus, if you plan to do much downloading over the Net, you'd be wise to
  165. invest in a good anti-viral program, just in case." (1)
  166.  
  167.  
  168. FTPMAIL AND BINARY FILES
  169.  
  170. Yesterday, I showed you that it is possible to get ftp files
  171. using e-mail by sending an e-mail letter to one of the following
  172. addresses
  173.  
  174.           Australia      ftpmail@cs.uow.edu.au
  175.           France         ftpmail@grasp.insa-lyon.fr
  176.           Germany        ftpmail@ftp.uni-stuttgart.de
  177.           Great Britain  ftpmail@doc.ic.ac.uk
  178.           Ireland        ftpmail@ieunet.ie
  179.           Sweden         ftpmail@lth.se
  180.           USA            ftpmail@sunsite.unc.edu
  181.           USA            ftpmail@ftp.uu.net
  182.           USA            ftpmail@decwrl.dec.com
  183.  
  184. with the following commands in the body of your e-mail letter
  185.  
  186.           reply <your Internet address>
  187.           connect <ftp site address>
  188.           <transfer mode>
  189.           chdir <directory>
  190.           get <filename>
  191.           quit
  192.  
  193. Before I introduce you to the new stuff, there are a couple of
  194. things that I want to review with you.
  195.  
  196. First, the
  197.  
  198.           reply <your Internet address>
  199.  
  200. command tells the FTPmail address where you want the file sent.
  201. If you use the example that I gave you yesterday
  202.  
  203.           reply pcrispe1@ua1vm.ua.edu
  204.           connect ftp.sura.net
  205.           ascii
  206.           chdir /pub/articles
  207.           get fall91.issue
  208.           quit
  209.  
  210. without changing the reply address, FTPmail is going to send the
  211. file to *ME*, not to you :)
  212.  
  213. Please remember to change the reply line to include *YOUR*
  214. Internet e-mail address.
  215.  
  216. Also, I did not mention this yesterday, but FTPmail limits
  217. you to only one CHDIR command per letter.
  218.  
  219. Finally, yesterday I asked you to contact you local Internet
  220. service provider to see if they placed any size limits on
  221. file transfers. If they do, there is an additional command
  222. that you need to add to your list of commands
  223.  
  224.           chunksize <size>
  225.  
  226. This command will break the files into chunks that your
  227. system can handle. If your system has a 50,000 character
  228. limit on messages from the Internet, your chunksize
  229. command should be
  230.  
  231.           chunksize 49000
  232.  
  233. (you want to make sure that you set your chunksize below what
  234. your system's limits are). This command will break your file
  235. into 49,000 character chunks, and will then send the chunks
  236. to you :)
  237.  
  238. You already now how to retrieve ASCII text files using FTPmail.
  239. Today, I am going to show you how to retrieve Binary files using
  240. FTPmail.
  241.  
  242. Binary file transfers using FTPmail aren't difficult ... they
  243. just require a few additional steps. Because all e-mail has to
  244. be in ASCII form, FTPmail has to encode your Binary file in
  245. ASCII before it can e-mail the file to you. Once you get the
  246. file, you can then decode the file back into Binary :)
  247.  
  248. Fortunately, there are two ways that FTPmail can encode Binary
  249. files into ASCII. The first way it can do this is through something
  250. called "uuencode." As long as you have a uudecode program -- and
  251. uudecode programs are all over the place (chances are your site
  252. has uudecode stored on its system) -- the whole process is simple.
  253.  
  254. The second encoding type that you can use is called "btoa" (binary
  255. to ascii). Your local Internet service provider will be able to
  256. tell you a little more about btoa.
  257.  
  258. So, to get ASCII files using FTPmail, you would use the following
  259. commands in the body of your letter to the FTPmail address:
  260.  
  261.           reply <your Internet address>
  262.           connect <ftp site address>
  263.           ascii
  264.           chdir <directory>
  265.           chunksize <size>
  266.           get <filename>
  267.  
  268. and to get Binary files using FTPmail, you would use the following
  269. commands in the body of your letter to the FTPmail address:
  270.  
  271.           reply <your Internet address>
  272.           connect <ftp site address>
  273.           <uuencode or btoa>
  274.           chdir <directory>
  275.           <encoding type>
  276.           chunksize <size>
  277.           get <filename>
  278.  
  279. TOMORROW: - ARCHIE
  280.           - A *HUGE* LIST OF FTP SITES THAT YOU CAN VISIT
  281.  
  282. HOMEWORK
  283.  
  284.      Take a break. You've earned it :)
  285.  
  286.  
  287. SOURCES
  288.  
  289. (1) "The EFF's Guide to the Internet", reprinted by permission.
  290.  
  291.  
  292.    PATRICK DOUGLAS CRISPEN    THE VIEWS EXPRESSED IN THIS LETTER DO NOT
  293.     PCRISPE1@UA1VM.UA.EDU      NECESSARILY REPRESENT THE VIEWS OF THE
  294.   THE UNIVERSITY OF ALABAMA      UNIVERSITY OF ALABAMA - TUSCALOOSA
  295.  
  296.       ROADMAP: COPYRIGHT PATRICK CRISPEN 1994. ALL RIGHTS RESERVED.
  297.  
  298.