Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 74104 invoked from network); 18 Jun 2008 01:06:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jun 2008 01:06:56 -0000 Received: (qmail 6110 invoked by uid 500); 18 Jun 2008 01:06:57 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 6038 invoked by uid 500); 18 Jun 2008 01:06:57 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 6027 invoked by uid 99); 18 Jun 2008 01:06:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jun 2008 18:06:57 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [208.75.86.161] (HELO vafer.org) (208.75.86.161) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jun 2008 01:06:06 +0000 Received: from dslb-084-058-095-148.pools.arcor-ip.net ([84.58.95.148]:32892 helo=[192.168.0.5]) by vafer.org with esmtpsa (TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.67) (envelope-from ) id 1K8m80-00071S-Pr for dev@commons.apache.org; Wed, 18 Jun 2008 01:06:25 +0000 Message-Id: From: Torsten Curdt To: "Commons Developers List" In-Reply-To: <4858060F.5030207@apache.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v924) Subject: Re: [compress] A few comments Date: Wed, 18 Jun 2008 03:06:23 +0200 References: <48577DC1.5000104@apache.org> <4858060F.5030207@apache.org> X-Mailer: Apple Mail (2.924) X-Virus-Checked: Checked by ClamAV on apache.org > - the exceptions could extend IOException Could - but why restrict it that way? (composition over inheritance) > - I'm not sure to understand the purpose of the jar classes, isn't a > jar just a renamed zip ? Essentially - yes. But the JDK also handles them differently because of meta data and so on. > - what's the intent with the empty classes CompressorInputStream and > CompressorOutputStream ? The GzipCompressor*Stream would become > unnecessary without these. I think it's a relict from the factory code. But I am not sure it would be so bad to keep them (for now) for the symmetry of the API. If we *really* don't need them - getting rid of that could be the last thing we do before a release ;) > - would it make sense to put the unix permissions at the > ArchiveEntry level ? Or maybe have a base class (UnixEntry?) for the > Tar/Ar/ZipEntry classes ? Well, I think e.g. RAR carries slightly different permissions. UnixEntry might be idea though. > - hungarian notation must die :) Yepp!! ....these classes are borrowed from ant :) > - IOUtils.copy(in, out) could call copy(in, out, size) Where is that? > - the exception handling in the factories could be simplified +1 > - the header in ArArchive*Stream could be factorized (ArConstants? > along with the sizes of the entry fields) Hm ...IMO only useful if used somewhere else. Otherwise it's just work. Or where do you see the benefit? > - it seems there are some duplicate classes in the zip package > (ZipEntry vs ZipArchiveEntry) Yepp ...ups! > - Ant has a JarMarker class that extends ZipExtraField, is there an > equivalent ? Could you elaborate? > - the zip package seems quite complicated, do we have to expose all > these classes as public ? Would actually be good to hide some more of that. Indeed. > - I wonder if the changeset model is mature enough. No - it's not :) > A higher level API to manipulate the archives would be nice, but I > believe an initial release could be made with just the stream classes. Hm ...indeed. But IMO the changeset stuff is where it actually gets interesting :) > - for simplicity, I would rename the 2 factories as Compressors and > Archives. The name of the methods could be shortened too, maybe > something like Compressors.newStream("bzip2", in). Not a big fan of static factory accessors. For the length - sure we could rename them. On the other hand the current names are quite self explanatory. Like that. > - what is missing to complete the API ? The implementation of the > changes package ? Or did you plan anything else ? Mostly changeset support and cleaning up. Especially the testcases need some more love. cheers -- Torsten --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org