From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96fa1b48edef3f254b346628ac2174d8@collyer.net> To: 9fans@cse.psu.edu Subject: Re: [9fans] netpbm Date: Fri, 4 Feb 2005 17:35:24 -0800 From: geoff@collyer.net In-Reply-To: <003301c50b01$d91b3940$26ec7d50@kilgore> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 3fce679a-eace-11e9-9e20-41e7f4b1d025 Russ requested recognising compressed archives by name (e.g., *.tgz) when extracting, and creating compressed archives under `rz' key-letters, with the compressor determined by the archive name. It doesn't use a different key-letter (option) for each compression scheme. It's table-driven and just runs the appropriate compressor or decompressor. We've all got shell scripts to do this sort of thing, but dealing with compressed archives is a common case and I don't see much harm in having tar initiate one end of a pipeline internally rather than requiring the user to do it externally. My tar.c is 994 lines currently, a little bigger than /sys/src/cmd/tar.c at 795 lines. It looks like 102 lines are devoted to dealing with compressed archives.