home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / gnu / utils / bug / 2483 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  2.8 KB

  1. Path: sparky!uunet!stanford.edu!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!chorus.FR!jloup
  2. From: jloup@chorus.FR (Jean-loup Gailly)
  3. Newsgroups: gnu.utils.bug
  4. Subject: gzip vs. zip (was: gzip0.8.1 will not unzip unix-zipped files)
  5. Date: 26 Jan 1993 22:02:36 -0500
  6. Organization: GNUs Not Usenet
  7. Lines: 60
  8. Sender: daemon@cis.ohio-state.edu
  9. Approved: bug-gnu-utils@prep.ai.mit.edu
  10. Distribution: gnu
  11. Message-ID: <1887@chorus.chorus.fr>
  12. References: <9301250305.AA09842@madonna.physics.ucla.edu>
  13. Reply-To: jloup@chorus.fr (Jean-loup Gailly)
  14.  
  15. Ken-ichiro Aoki <aoki@madonna.physics.ucla.edu> writes:
  16.  
  17. > when I use unix-zip and try to unzip using gunzip, I get the following.
  18. >  g.zip: first entry not deflated or stored--can't extract
  19.  
  20. See comment in unzip.c:
  21.  
  22.    This version can extract files in gzip or pkzip format.
  23.    For the latter, only the first entry is extracted, and it has to be
  24.    either deflated or stored.
  25.  
  26. I apologize for forgetting to document this restriction in gzip.1 and
  27. gzip.info. The intent was only to be able to extract old tar.zip files
  28. containing a single deflated entry, made with:
  29.  
  30.   tar cf - . | zip > foo.tar.zip
  31.  
  32. Such files should now be replaced with tar.z files, made with:
  33.  
  34.   tar cfz foo.tar.z  .
  35.  
  36. To extract other zip files (with several members or different compression
  37. methods), use unzip. zip and gzip serve different purposes and I don't
  38. have the intention of merging them.
  39.  
  40. Since many people have asked me this question, here is a quick comparison
  41. of zip and tar+gzip:
  42.  
  43. - "tar -z" (tar+gzip) compresses a tar file into a single stream. To
  44.   extract one specific member (with "tar xfz foo.tar.z member) gunzip
  45.   decompresses the whole tar.z file and passes that to tar. This method
  46.   improves compression since gzip can take advantage of redundancy between
  47.   files.
  48.  
  49. - zip compresses file members independently. unzip is then able to seek
  50.   directly to the proper location for extraction of a single member.
  51.   This method degrades compression but enables recovery in case of
  52.   damage to a portion of the zip file. If a tar.z file is damaged, all
  53.   data after the error is lost.
  54.  
  55. - the current version of zip does not store uid and gid, and compresses hard
  56.   links several times. tar works correctly.
  57.  
  58. - unzip has many tricks to convert file names from one system to another,
  59.   restore special file attributes (for VMS and OS/2), etc... gzip is
  60.   only a data compression program, and I want to keep it simple.
  61.  
  62.  
  63. I am thinking of adding an optional block size parameter to gzip to
  64. improve error recovery (see the file TODO in the gzip 0.8.1 distribution).
  65.  
  66. > zip I used was Zip 1.0 (29 September 1991)
  67.  
  68. Get zip 1.9p1 and unzip 5.0p1:
  69.          oak.oakland.edu:/pub/misc/unix/zip19p1.tar-z
  70.          oak.oakland.edu:/pub/misc/unix/unz50p1.tar-z
  71.  
  72. Jean-loup Gailly
  73. jloup@chorus.fr
  74.  
  75.