From: Massimiliano Mirra Date: 2002-01-15T01:17:53+09:00 Subject: Re: Best way for platf. independent compression? On Mon, Jan 14, 2002 at 12:08:58PM +0900, Chris Gehlker wrote: > On Macs, gnutar will be their if the user installed the optional > Developer Tools. It a pretty safe bet that she did in order to build > ruby in the first place. Good, this leaves a door open. > Backquotes work fine but 'tar' is not symlinked to gnutar. Rather it will > invoke BSD tar which, IIRC, needs an explicit z parameter to deal with .tgz > files. So you are better off with > `tar -xzf #{pkgdir}` > Or > `gnutar xcf #{pkgdir}` Sorry? GNU tar needs a `z' parameter to deal with gzipped files, too. E.g. to pack: tar zcf archive.tar.gz dir And to unpack: tar zxf archive.tar.gz > I think the former will work on every BSD. So it seems that we're not limited to GNU tar. That's good news. To summarize, the chances for tar as compression tool for packets are: - Linux: will work everywhere. - BSD: idem. - Other Unices: idem, I guess. - Mac/Mac OS X: idem, as it is needed to install Ruby. - Windows: winzip could maybe do it. - Hand helds: don't know. Probably only those running Linux (iPAQ?). - Other platforms? Anyway, I'm somewhat biased for an all-Ruby solution, but a compression *format* (no matter its speed or ratio) is still something that must be chosen carefully. Massimiliano