Return-Path:
Delivered-To: apmail-commons-commits-archive@minotaur.apache.org
Received: (qmail 4903 invoked from network); 19 Mar 2010 15:27:14 -0000
Received: from unknown (HELO mail.apache.org) (140.211.11.3)
by 140.211.11.9 with SMTP; 19 Mar 2010 15:27:14 -0000
Received: (qmail 97095 invoked by uid 500); 19 Mar 2010 15:27:13 -0000
Delivered-To: apmail-commons-commits-archive@commons.apache.org
Received: (qmail 97037 invoked by uid 500); 19 Mar 2010 15:27:13 -0000
Mailing-List: contact commits-help@commons.apache.org; run by ezmlm
Precedence: bulk
List-Help:
List-Unsubscribe:
List-Post:
List-Id:
Reply-To: dev@commons.apache.org
Delivered-To: mailing list commits@commons.apache.org
Received: (qmail 97030 invoked by uid 99); 19 Mar 2010 15:27:13 -0000
Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136)
by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Mar 2010 15:27:13 +0000
X-ASF-Spam-Status: No, hits=-1111.3 required=10.0
tests=ALL_TRUSTED,AWL
X-Spam-Check-By: apache.org
Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4)
by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Mar 2010 15:27:12 +0000
Received: by eris.apache.org (Postfix, from userid 65534)
id B1A6F238899B; Fri, 19 Mar 2010 15:26:52 +0000 (UTC)
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: svn commit: r925271 -
/commons/proper/compress/trunk/src/site/xdoc/zip.xml
Date: Fri, 19 Mar 2010 15:26:52 -0000
To: commits@commons.apache.org
From: bodewig@apache.org
X-Mailer: svnmailer-1.0.8
Message-Id: <20100319152652.B1A6F238899B@eris.apache.org>
Author: bodewig
Date: Fri Mar 19 15:26:52 2010
New Revision: 925271
URL: http://svn.apache.org/viewvc?rev=925271&view=rev
Log:
add some documentation related to COMPRESS-103
Modified:
commons/proper/compress/trunk/src/site/xdoc/zip.xml
Modified: commons/proper/compress/trunk/src/site/xdoc/zip.xml
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/site/xdoc/zip.xml?rev=925271&r1=925270&r2=925271&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/site/xdoc/zip.xml (original)
+++ commons/proper/compress/trunk/src/site/xdoc/zip.xml Fri Mar 19 15:26:52 2010
@@ -81,8 +81,25 @@
first and provide correct and complete information on any
ZIP archive.
+ ZIP archives know a feature called the data descriptor
+ which is a way to store an entry's length after the entry's
+ data. This can only work reliably if the size information
+ can be taken from the central directory or the data itself
+ can signal it is complete, which is true for data that is
+ compressed using the DEFLATED compression algorithm.
+
+ ZipFile
has access to the central directory
+ and can extract entries using the data descriptor reliably.
+ The same is true for ZipArchiveInputStream
as
+ long as the entry is DEFLATED. For STORED
+ entries ZipArchiveInputStream
can try to read
+ ahead until if finds the next entry, but this approach is
+ not safe and has to be enabled by a constructor argument
+ explicitly.
+
If possible, you should always prefer ZipFile
over ZipArchiveInputStream
.
+