Compressed Resources

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.

bzip2resource

This is a compressed resource using the BZIP2 compression.

Examples

<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.

gzipresource

This is a compressed resource using the GZIP compression.

Examples

<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.

pack200resource

This is a compressed resource using the Pack200 compression.

Examples

<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.