| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <html> |
| |
| <head> |
| <meta http-equiv="Content-Language" content="en-us"> |
| <link rel="stylesheet" type="text/css" href="style.css"> |
| <title>Compressed Resource</title> |
| </head> |
| |
| <body> |
| |
| <h2><a name="compresource">Compressed Resources</a></h2> |
| |
| <p>For each of the supported compression formats there is a |
| correspondig resource that wraps around another resource providing |
| compression or decompression on the fly. A single element resource |
| collection must be specified as a nested element.</p> |
| |
| <a name="decompressConcatenated"> |
| <p>Resources for the formats that support files holding multiple |
| compressed streams (bzip2, gzip and xz) support a boolean attribute |
| decompressConcatenated. If set to true all streams will be |
| concatenated and treated as a single resource. With the default |
| value false only the first stream is uncompressed.</p> |
| </a> |
| |
| <h2><a name="bzip2resource">bzip2resource</a></h2> |
| |
| <p>This is a <a href="#compresource">compressed resource</a> using the |
| BZIP2 compression.</p> |
| |
| <p>This resource supports |
| the <a href="#decompressConcatenated">decompressConcatenated</a> |
| attribute.</p> |
| |
| <h4>Examples</h4> |
| |
| <pre> |
| <cmp:tarentry xmlns:cmp="antlib:org.apache.ant.compress" |
| name="some-file.txt"> |
| <cmp:bzip2resource> |
| <file file="some-archive.tar.bz2"/> |
| </cmp:bzip2resource> |
| </cmp:tarentry> |
| </pre> |
| |
| <p>Represents the entry named some-file.txt in archive |
| some-archive.tar.bz2 where the <code>bzip2resource</code> provides |
| the decompression of the archive.</p> |
| |
| <h2><a name="gzipresource">gzipresource</a></h2> |
| |
| <p>This is a <a href="#compresource">compressed resource</a> using the |
| GZIP compression.</p> |
| |
| <p>This resource supports |
| the <a href="#decompressConcatenated">decompressConcatenated</a> |
| attribute.</p> |
| |
| <h4>Examples</h4> |
| |
| <pre> |
| <cmp:tarentry xmlns:cmp="antlib:org.apache.ant.compress" |
| name="some-file.txt"> |
| <cmp:gzipresource> |
| <file file="some-archive.tar.gz"/> |
| </cmp:gzipresource> |
| </cmp:tarentry> |
| </pre> |
| |
| <p>Represents the entry named some-file.txt in archive |
| some-archive.tar.gz where the <code>gzipresource</code> provides |
| the decompression of the archive.</p> |
| |
| <h2><a name="lzmaresource">lzmaresource</a></h2> |
| |
| <p><em>Since Apache Compress Antlib 1.3</em>.</p> |
| |
| <p>This is a <a href="#compresource">compressed resource</a> using the |
| LZMA compression.</p> |
| |
| <h4>Examples</h4> |
| |
| <pre> |
| <cmp:tarentry xmlns:cmp="antlib:org.apache.ant.compress" |
| name="some-file.txt"> |
| <cmp:lzmaresource> |
| <file file="some-archive.tar.lzma"/> |
| </cmp:lzmaresource> |
| </cmp:tarentry> |
| </pre> |
| |
| <p>Represents the entry named some-file.txt in archive |
| some-archive.tar.gz where the <code>lzmaresource</code> provides |
| the decompression of the archive.</p> |
| |
| <h2><a name="pack200resource">pack200resource</a></h2> |
| |
| <p>This is a <a href="#compresource">compressed resource</a> using the |
| <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/jar/Pack200.html">Pack200</a> |
| compression.</p> |
| |
| <h4>Examples</h4> |
| |
| <pre> |
| <cmp:zipentry xmlns:cmp="antlib:org.apache.ant.compress" |
| name="SomeFile.class"> |
| <cmp:pack200resource> |
| <file file="some-archive.pack"/> |
| </cmp:pack200resource> |
| </cmp:zipentry> |
| </pre> |
| |
| <p>Represents the entry named Somefile.class in the Pack200 compressed |
| JAR some-archive.pack where the <code>pack200resource</code> |
| provides the decompression of the archive.</p> |
| |
| <h2><a name="xzresource">xzresource</a></h2> |
| |
| <p>This is a <a href="#compresource">compressed resource</a> using the |
| XZ compression.</p> |
| |
| <p>This resource supports |
| the <a href="#decompressConcatenated">decompressConcatenated</a> |
| attribute.</p> |
| |
| <h4>Examples</h4> |
| |
| <pre> |
| <cmp:tarentry xmlns:cmp="antlib:org.apache.ant.compress" |
| name="some-file.txt"> |
| <cmp:xzresource> |
| <file file="some-archive.tar.xz"/> |
| </cmp:xzresource> |
| </cmp:tarentry> |
| </pre> |
| |
| <p>Represents the entry named some-file.txt in archive |
| some-archive.tar.xz where the <code>xzresource</code> provides |
| the decompression of the archive.</p> |
| |