commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1529388 - in /commons/proper/compress/trunk/src: main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java site/xdoc/examples.xml site/xdoc/index.xml
Date Sat, 05 Oct 2013 05:25:51 GMT
Author: bodewig
Date: Sat Oct  5 05:25:51 2013
New Revision: 1529388

URL: http://svn.apache.org/r1529388
Log:
record Deflate support

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

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java?rev=1529388&r1=1529387&r2=1529388&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java
Sat Oct  5 05:25:51 2013
@@ -39,7 +39,7 @@ import org.apache.commons.compress.utils
  * The 7z file format is a flexible container
  * that can contain many compression and
  * encryption types, but at the moment only
- * only Copy, LZMA, LZMA2, BZIP2, and AES-256 + SHA-256
+ * only Copy, LZMA, LZMA2, BZIP2, Deflate and AES-256 + SHA-256
  * are supported.
  * <p>
  * The format is very Windows/Intel specific,
@@ -270,30 +270,6 @@ public class SevenZFile {
             nextHeaderInputStream.close();
         }
         return new DataInputStream(new ByteArrayInputStream(nextHeader));
-
-        
-        //throw new IOException("LZMA compression unsupported, so files with compressed header
cannot be read");
-        // FIXME: this extracts the header to an LZMA file which can then be
-        // manually decompressed.
-//        long offset = SIGNATURE_HEADER_SIZE + archive.packPos;
-//        file.seek(offset);
-//        long unpackSize = archive.folders[0].getUnpackSize();
-//        byte[] packed = new byte[(int)archive.packSizes[0]];
-//        file.readFully(packed);
-//        
-//        FileOutputStream fos = new FileOutputStream(new File("/tmp/encodedHeader.7z"));
-//        fos.write(archive.folders[0].coders[0].properties);
-//        // size - assuming < 256
-//        fos.write((int)(unpackSize & 0xff));
-//        fos.write(0);
-//        fos.write(0);
-//        fos.write(0);
-//        fos.write(0);
-//        fos.write(0);
-//        fos.write(0);
-//        fos.write(0);
-//        fos.write(packed);
-//        fos.close();
     }
     
     private void readStreamsInfo(final DataInput header, final Archive archive) throws IOException
{

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=1529388&r1=1529387&r2=1529388&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/site/xdoc/examples.xml (original)
+++ commons/proper/compress/trunk/src/site/xdoc/examples.xml Sat Oct  5 05:25:51 2013
@@ -462,8 +462,8 @@ lzmaIn.close();
 
         <p>Note that Commons Compress currently only supports
         a subset of compression and encryption algorithms used for 7z
-        archives.  For reading only uncompressed entries of LZMA,
-        LZMA2, BZIP2 and AES-256/SHA-256 are supported.  Only
+        archives.  For reading only uncompressed entries or LZMA,
+        LZMA2, BZIP2, Deflate and AES-256/SHA-256 are supported.  Only
         uncompressed and unencrypted archives can be written.</p>
 
         <p>Adding an entry to a 7z archive:</p>

Modified: commons/proper/compress/trunk/src/site/xdoc/index.xml
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/site/xdoc/index.xml?rev=1529388&r1=1529387&r2=1529388&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/site/xdoc/index.xml (original)
+++ commons/proper/compress/trunk/src/site/xdoc/index.xml Sat Oct  5 05:25:51 2013
@@ -79,7 +79,7 @@
             features found in java.util.zip.  As of Commons Compress
             1.6 support for the dump and arj formats is
             read-only - 7z can read most compressed and encrypted
-            archives but only write uncompressed ones.  LZMA(2) supprt
+            archives but only write uncompressed ones.  LZMA(2) support
             in 7z requires <a href="http://tukaani.org/xz/java.html">XZ for
             Java</a> as well.</p>
 



Mime
View raw message