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.
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.
This is a compressed resource using the BZIP2 compression.
This resource supports the decompressConcatenated attribute.
<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>
Represents the entry named some-file.txt in archive
some-archive.tar.bz2 where the bzip2resource
provides
the decompression of the archive.
This is a compressed resource using the GZIP compression.
This resource supports the decompressConcatenated attribute.
<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>
Represents the entry named some-file.txt in archive
some-archive.tar.gz where the gzipresource
provides
the decompression of the archive.
Since Apache Compress Antlib 1.3.
This is a compressed resource using the LZMA compression.
<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>
Represents the entry named some-file.txt in archive
some-archive.tar.gz where the lzmaresource
provides
the decompression of the archive.
This is a compressed resource using the Pack200 compression.
<cmp:zipentry xmlns:cmp="antlib:org.apache.ant.compress" name="SomeFile.class"> <cmp:pack200resource> <file file="some-archive.pack"/> </cmp:pack200resource> </cmp:zipentry>
Represents the entry named Somefile.class in the Pack200 compressed
JAR some-archive.pack where the pack200resource
provides the decompression of the archive.
This is a compressed resource using the XZ compression.
This resource supports the decompressConcatenated attribute.
<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>
Represents the entry named some-file.txt in archive
some-archive.tar.xz where the xzresource
provides
the decompression of the archive.