From: Asheesh Laroia Date: Tue, 10 Jun 2008 14:04:09 GMT Subject: Re: [PATCH - stgit] Patch to allow import of compressed files Message-ID: In-Reply-To: <484E8833.9030302@gmail.com> On Tue, 10 Jun 2008, Clark Williams wrote: > Asheesh Laroia wrote: >> >> Peanut gallery question: Why not just always try these methods and catch >> some format exception if they fail, proceeding to the next possible >> decompressor (proceeding on to no decompressor)? >> >> That way if a file is called .GZ, it will still be handled properly; in >> fact, all files would still be handled properly. And these formats >> leave notes in the first few bytes of the file as to if they should be >> tried, so it's not as if it would come at some performance cost. > > Interesting thought. Do all the decompressors throw an error if the input format > isn't recognized? Yup! (Try it!) -- Asheesh. -- You might have mail.