• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0"?>
2<!--
3
4   Licensed to the Apache Software Foundation (ASF) under one or more
5   contributor license agreements.  See the NOTICE file distributed with
6   this work for additional information regarding copyright ownership.
7   The ASF licenses this file to You under the Apache License, Version 2.0
8   (the "License"); you may not use this file except in compliance with
9   the License.  You may obtain a copy of the License at
10
11       http://www.apache.org/licenses/LICENSE-2.0
12
13   Unless required by applicable law or agreed to in writing, software
14   distributed under the License is distributed on an "AS IS" BASIS,
15   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   See the License for the specific language governing permissions and
17   limitations under the License.
18
19-->
20<document>
21    <properties>
22        <title>Overview</title>
23        <author email="dev@commons.apache.org">Commons Documentation Team</author>
24    </properties>
25    <body>
26        <section name="Apache Commons Compress&#x2122;">
27            <p>
28                The Apache Commons Compress library defines an API for
29                working with ar, cpio, Unix dump, tar, zip, gzip, XZ,
30                Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4,
31                Brotli, Zstandard, DEFLATE64 and Z files.
32            </p>
33            <p>
34                The code in this component has many origins:
35            </p>
36            <ul>
37              <li>The bzip2, tar and zip support came from Avalon's
38                Excalibur, but originally from Ant, as far as life in
39                Apache goes. The tar package is originally Tim Endres'
40                public domain package. The bzip2 package is based on
41                the work done by Keiron Liddle as well as Julian Seward's
42                <a href="http://www.bzip.org/index.html">libbzip2</a>.
43                It has migrated
44                via:<br/> Ant -&gt; Avalon-Excalibur -&gt; Commons-IO
45                -&gt; Commons-Compress.</li>
46              <li>The cpio package has been contributed by Michael Kuss
47                and
48                the <a href="http://jrpm.sourceforge.net/">jRPM</a>
49                project.</li>
50            </ul>
51
52        </section>
53
54        <section name="Status">
55          <p>The current release is 1.18 and requires Java 7.</p>
56
57          <p>Below we highlight some new features, for a full list
58          of changes see the <a href="changes-report.html">Changes
59          Report</a>.</p>
60
61          <subsection name="What's new in 1.18?">
62            <ul>
63              <li>The CPIO package now properly handles file names
64              using a mult-byte encoding.</li>
65              <li>ZipArchiveInputStream can now deal with APK files
66              containing an APK signing block.</li>
67              <li>It is now possible to specifiy various parameters
68              for Zstd output.</li>
69            </ul>
70          </subsection>
71        </section>
72
73        <section name="Documentation">
74          <p>The compress component is split into <em>compressors</em> and
75            <em>archivers</em>.  While <em>compressors</em>
76            (un)compress streams that usually store a single
77            entry, <em>archivers</em> deal with archives that contain
78            structured content represented
79            by <code>ArchiveEntry</code> instances which in turn
80            usually correspond to single files or directories.</p>
81
82          <p>Currently the bzip2, Pack200, XZ, gzip, lzma, brotli,
83            Zstandard and Z formats are
84            supported as compressors where gzip support is mostly provided by
85            the <code>java.util.zip</code> package and Pack200 support
86            by the <code>java.util.jar</code> package of the Java
87            class library.  XZ and lzma support is provided by the public
88            domain <a href="https://tukaani.org/xz/java.html">XZ for
89            Java</a> library.  Brotli support is provided by the MIT
90            licensed <a href="https://github.com/google/brotli">Google
91            Brotli decoder</a>. Zstandard support is provided by the BSD
92            licensed <a href="https://github.com/luben/zstd-jni">Zstd-jni</a>.
93            As of Commons Compress 1.18 support for the DEFLATE64, Z and Brotli
94            formats is read-only.</p>
95
96          <p>The ar, arj, cpio, dump, tar, 7z and zip formats are supported as
97            archivers where the <a href="zip.html">zip</a>
98            implementation provides capabilities that go beyond the
99            features found in java.util.zip.  As of Commons Compress
100            1.18 support for the dump and arj formats is
101            read-only - 7z can read most compressed and encrypted
102            archives but only write unencrypted ones.  LZMA(2) support
103            in 7z requires <a href="https://tukaani.org/xz/java.html">XZ for
104            Java</a> as well.</p>
105
106          <p>The compress component provides abstract base classes for
107            compressors and archivers together with factories that can
108            be used to choose implementations by algorithm name.  In
109            the case of input streams the factories can also be used
110            to guess the format and provide the matching
111            implementation.</p>
112
113          <ul>
114            <li>The <a href="examples.html">user guide</a> contains
115            more detailed information and some examples.</li>
116            <li>The <a href="limitations.html">known limitations and
117            problems</a> page lists the currently known problems
118            grouped by the format they apply to.</li>
119            <li>The <a href="apidocs/index.html">Javadoc</a> of the latest GIT</li>
120            <li>The <a href="https://git-wip-us.apache.org/repos/asf?p=commons-compress.git;a=tree">GIT
121                repository</a> can be browsed.</li>
122            </ul>
123        </section>
124        <section name="Releases">
125          <p>
126            <a href="https://commons.apache.org/compress/download_compress.cgi">Download now!</a>
127          </p>
128        </section>
129    </body>
130</document>
131