commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1571065 - in /commons/proper/compress/trunk/src: main/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFile.java site/xdoc/examples.xml
Date Sun, 23 Feb 2014 19:22:18 GMT
Author: bodewig
Date: Sun Feb 23 19:22:18 2014
New Revision: 1571065

URL: http://svn.apache.org/r1571065
Log:
some things I've learned by wading through the format spec

Modified:
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFile.java
    commons/proper/compress/trunk/src/site/xdoc/examples.xml

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFile.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFile.java?rev=1571065&r1=1571064&r2=1571065&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFile.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFile.java
Sun Feb 23 19:22:18 2014
@@ -297,7 +297,7 @@ public class SevenZOutputFile implements
         }
         
         header.write(NID.kCRC);
-        header.write(1);
+        header.write(1); // "allAreDefined" == true
         for (final SevenZArchiveEntry entry : files) {
             if (entry.hasStream()) {
                 header.writeInt(Integer.reverseBytes((int) entry.getCompressedCrcValue()));
@@ -325,7 +325,7 @@ public class SevenZOutputFile implements
         }
         
         header.write(NID.kCRC);
-        header.write(1);
+        header.write(1); // "allAreDefined" == true
         for (final SevenZArchiveEntry entry : files) {
             if (entry.hasStream()) {
                 header.writeInt(Integer.reverseBytes((int) entry.getCrcValue()));
@@ -490,7 +490,7 @@ public class SevenZOutputFile implements
                 }
                 writeBits(out, cTimes, files.size());
             } else {
-                out.write(1);
+                out.write(1); // "allAreDefined" == true
             }
             out.write(0);
             for (final SevenZArchiveEntry entry : files) {
@@ -526,7 +526,7 @@ public class SevenZOutputFile implements
                 }
                 writeBits(out, aTimes, files.size());
             } else {
-                out.write(1);
+                out.write(1); // "allAreDefined" == true
             }
             out.write(0);
             for (final SevenZArchiveEntry entry : files) {
@@ -562,7 +562,7 @@ public class SevenZOutputFile implements
                 }
                 writeBits(out, mTimes, files.size());
             } else {
-                out.write(1);
+                out.write(1); // "allAreDefined" == true
             }
             out.write(0);
             for (final SevenZArchiveEntry entry : files) {
@@ -598,7 +598,7 @@ public class SevenZOutputFile implements
                 }
                 writeBits(out, attributes, files.size());
             } else {
-                out.write(1);
+                out.write(1); // "allAreDefined" == true
             }
             out.write(0);
             for (final SevenZArchiveEntry entry : files) {

Modified: commons/proper/compress/trunk/src/site/xdoc/examples.xml
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/site/xdoc/examples.xml?rev=1571065&r1=1571064&r2=1571065&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/site/xdoc/examples.xml (original)
+++ commons/proper/compress/trunk/src/site/xdoc/examples.xml Sun Feb 23 19:22:18 2014
@@ -489,6 +489,12 @@ lzmaIn.close();
 
         <p>Multipart archives are not supported at all.</p>
 
+        <p>Currently solid compression - compressing multiple files
+        as a single block to benefit from patterns repeating accross
+        files - is only supported when reading archives.  This also
+        means compression ratio will likely be worse when using
+        Commons Compress.</p>
+
         <p>Adding an entry to a 7z archive:</p>
 <source><![CDATA[
 SevenZOutputFile sevenZOutput = new SevenZOutputFile(file);



Mime
View raw message