commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1435897 - in /commons/proper/compress/trunk/src/site/xdoc: tar.xml zip.xml
Date Sun, 20 Jan 2013 17:31:24 GMT
Author: bodewig
Date: Sun Jan 20 17:31:23 2013
New Revision: 1435897

URL: http://svn.apache.org/viewvc?rev=1435897&view=rev
Log:
COMPRESS-202 document current end-of-archive behavior of tar/zip input as well as what I intend
to implement before the next release

Modified:
    commons/proper/compress/trunk/src/site/xdoc/tar.xml
    commons/proper/compress/trunk/src/site/xdoc/zip.xml

Modified: commons/proper/compress/trunk/src/site/xdoc/tar.xml
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/site/xdoc/tar.xml?rev=1435897&r1=1435896&r2=1435897&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/site/xdoc/tar.xml (original)
+++ commons/proper/compress/trunk/src/site/xdoc/tar.xml Sun Jan 20 17:31:23 2013
@@ -133,6 +133,24 @@
         currently not be detected at all.</p>
       </subsection>
 
+      <subsection name="Consuming Archives Completely">
+
+        <p>The end of a tar archive is signalled by two consecutive
+        records of all zeros.  Unfortunately not all tar
+        implementations adhere to this and some only write one record
+        to end the archive.  Commons Compress will always write two
+        records but stop reading an archive as soon as finds one
+        record of all zeros.</p>
+
+        <p>Prior to version 1.5 this could leave the second EOF record
+        inside the stream when <code>getNextEntry</code> or
+        <code>getNextTarEntry</code> returned <code>null</code>
+        Starting with version 1.5 <code>TarArchiveInputStream</code>
+        will try to read a second record as well if present,
+        effectively consuming the archive completely.</p>
+
+      </subsection>
+
     </section>
   </body>
 </document>

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=1435897&r1=1435896&r2=1435897&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/site/xdoc/zip.xml (original)
+++ commons/proper/compress/trunk/src/site/xdoc/zip.xml Sun Jan 20 17:31:23 2013
@@ -447,6 +447,20 @@
         are used to load JAR files and are the base for the
         <code>jar</code> command line utility as well.</p>
       </subsection>
+
+      <subsection name="Consuming Archives Completely">
+
+        <p>Prior to version 1.5 <code>ZipArchiveInputStream</code>
+        would return null from <code>getNextEntry</code> or
+        <code>getNextZipEntry</code> as soon as the first central
+        directory header of the archive was found, leaving the whole
+        central directory itself unread inside the stream.  Starting
+        with version 1.5 <code>ZipArchiveInputStream</code> will try
+        to read the archive up to and including the "end of central
+        directory" record effectively consuming the archive
+        completely.</p>
+
+      </subsection>
     </section>
   </body>
 </document>



Mime
View raw message