2006-09-11 04:19:00 +00:00
|
|
|
<!--
|
|
|
|
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.
|
|
|
|
-->
|
Here are two new ant tasks - BZip2 and BUnzip2. �These
two tasks use the BZip2 compression algorithm (Visit:
http://sourceware.cygnus.com/bzip2/�for more info.) for
packing and unpacking.
These tasks resemble GZip and GUnzip tasks in input,
input validation, etc. �Hence, I refactored GZip and
GUnzip tasks as well so that the tasks GZip and BZip2
extend from a common base class named Pack, and
GUnzip and BUnzip2 extend from a common base class named
Unpack. �This lays the foundation for creating more Pack
tasks based on different algorithms like lzop, etc. in
the future.
The BZip2 and BUnzip2 tasks depend upon 4 classes:
BZip2Constants.java
CBZip2InputStream.java
CBZip2OutputStream.java
CRC.java
Keiron Liddle (keiron@aftexsw.com) has graciously
accepted to contribute the above code files he has
authored, under ASF license - many thanks to him. �I
have packaged them under org.apache.tools.bzip2,
mimicking the package naming style that has been used
for zip and tar tools we already have. �I have also
given proper credits to him in the code. �Perhaps, this
needs to exist under jakarta-commons, as Stefan had
suggested, but till then...
Submitted by: "Magesh Umasankar" <umagesh@rediffmail.com>
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269919 13f79535-47bb-0310-9956-ffa450edef68
2001-11-15 09:14:10 +00:00
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Language" content="en-us">
|
2005-04-29 18:58:16 +00:00
|
|
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
2017-01-12 17:19:15 +01:00
|
|
|
<title>GZip/BZip2/XZ Tasks</title>
|
Here are two new ant tasks - BZip2 and BUnzip2. �These
two tasks use the BZip2 compression algorithm (Visit:
http://sourceware.cygnus.com/bzip2/�for more info.) for
packing and unpacking.
These tasks resemble GZip and GUnzip tasks in input,
input validation, etc. �Hence, I refactored GZip and
GUnzip tasks as well so that the tasks GZip and BZip2
extend from a common base class named Pack, and
GUnzip and BUnzip2 extend from a common base class named
Unpack. �This lays the foundation for creating more Pack
tasks based on different algorithms like lzop, etc. in
the future.
The BZip2 and BUnzip2 tasks depend upon 4 classes:
BZip2Constants.java
CBZip2InputStream.java
CBZip2OutputStream.java
CRC.java
Keiron Liddle (keiron@aftexsw.com) has graciously
accepted to contribute the above code files he has
authored, under ASF license - many thanks to him. �I
have packaged them under org.apache.tools.bzip2,
mimicking the package naming style that has been used
for zip and tar tools we already have. �I have also
given proper credits to him in the code. �Perhaps, this
needs to exist under jakarta-commons, as Stefan had
suggested, but till then...
Submitted by: "Magesh Umasankar" <umagesh@rediffmail.com>
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269919 13f79535-47bb-0310-9956-ffa450edef68
2001-11-15 09:14:10 +00:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
2018-01-22 23:52:21 +01:00
|
|
|
<h2 id="pack">GZip/BZip2/XZ</h2>
|
Here are two new ant tasks - BZip2 and BUnzip2. �These
two tasks use the BZip2 compression algorithm (Visit:
http://sourceware.cygnus.com/bzip2/�for more info.) for
packing and unpacking.
These tasks resemble GZip and GUnzip tasks in input,
input validation, etc. �Hence, I refactored GZip and
GUnzip tasks as well so that the tasks GZip and BZip2
extend from a common base class named Pack, and
GUnzip and BUnzip2 extend from a common base class named
Unpack. �This lays the foundation for creating more Pack
tasks based on different algorithms like lzop, etc. in
the future.
The BZip2 and BUnzip2 tasks depend upon 4 classes:
BZip2Constants.java
CBZip2InputStream.java
CBZip2OutputStream.java
CRC.java
Keiron Liddle (keiron@aftexsw.com) has graciously
accepted to contribute the above code files he has
authored, under ASF license - many thanks to him. �I
have packaged them under org.apache.tools.bzip2,
mimicking the package naming style that has been used
for zip and tar tools we already have. �I have also
given proper credits to him in the code. �Perhaps, this
needs to exist under jakarta-commons, as Stefan had
suggested, but till then...
Submitted by: "Magesh Umasankar" <umagesh@rediffmail.com>
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269919 13f79535-47bb-0310-9956-ffa450edef68
2001-11-15 09:14:10 +00:00
|
|
|
<h3>Description</h3>
|
2018-02-28 07:58:59 +01:00
|
|
|
<p>Packs a resource using the GZip, BZip2 or XZ algorithm. The output file is only generated if it
|
|
|
|
doesn't exist or the source resource is newer.</p>
|
2017-01-12 17:19:15 +01:00
|
|
|
|
2018-02-28 07:58:59 +01:00
|
|
|
<p>XZ compression support has been added <em>since Apache Ant 1.10.1</em> and depends on external
|
|
|
|
libraries not included in the Ant distribution.
|
|
|
|
See <a href="../install.html#librarydependencies">Library Dependencies</a> for more information.</p>
|
2017-01-12 17:19:15 +01:00
|
|
|
|
Here are two new ant tasks - BZip2 and BUnzip2. �These
two tasks use the BZip2 compression algorithm (Visit:
http://sourceware.cygnus.com/bzip2/�for more info.) for
packing and unpacking.
These tasks resemble GZip and GUnzip tasks in input,
input validation, etc. �Hence, I refactored GZip and
GUnzip tasks as well so that the tasks GZip and BZip2
extend from a common base class named Pack, and
GUnzip and BUnzip2 extend from a common base class named
Unpack. �This lays the foundation for creating more Pack
tasks based on different algorithms like lzop, etc. in
the future.
The BZip2 and BUnzip2 tasks depend upon 4 classes:
BZip2Constants.java
CBZip2InputStream.java
CBZip2OutputStream.java
CRC.java
Keiron Liddle (keiron@aftexsw.com) has graciously
accepted to contribute the above code files he has
authored, under ASF license - many thanks to him. �I
have packaged them under org.apache.tools.bzip2,
mimicking the package naming style that has been used
for zip and tar tools we already have. �I have also
given proper credits to him in the code. �Perhaps, this
needs to exist under jakarta-commons, as Stefan had
suggested, but till then...
Submitted by: "Magesh Umasankar" <umagesh@rediffmail.com>
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269919 13f79535-47bb-0310-9956-ffa450edef68
2001-11-15 09:14:10 +00:00
|
|
|
<h3>Parameters</h3>
|
2018-02-28 07:58:59 +01:00
|
|
|
<table class="attr">
|
Here are two new ant tasks - BZip2 and BUnzip2. �These
two tasks use the BZip2 compression algorithm (Visit:
http://sourceware.cygnus.com/bzip2/�for more info.) for
packing and unpacking.
These tasks resemble GZip and GUnzip tasks in input,
input validation, etc. �Hence, I refactored GZip and
GUnzip tasks as well so that the tasks GZip and BZip2
extend from a common base class named Pack, and
GUnzip and BUnzip2 extend from a common base class named
Unpack. �This lays the foundation for creating more Pack
tasks based on different algorithms like lzop, etc. in
the future.
The BZip2 and BUnzip2 tasks depend upon 4 classes:
BZip2Constants.java
CBZip2InputStream.java
CBZip2OutputStream.java
CRC.java
Keiron Liddle (keiron@aftexsw.com) has graciously
accepted to contribute the above code files he has
authored, under ASF license - many thanks to him. �I
have packaged them under org.apache.tools.bzip2,
mimicking the package naming style that has been used
for zip and tar tools we already have. �I have also
given proper credits to him in the code. �Perhaps, this
needs to exist under jakarta-commons, as Stefan had
suggested, but till then...
Submitted by: "Magesh Umasankar" <umagesh@rediffmail.com>
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269919 13f79535-47bb-0310-9956-ffa450edef68
2001-11-15 09:14:10 +00:00
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<th>Attribute</th>
|
|
|
|
<th>Description</th>
|
|
|
|
<th>Required</th>
|
Here are two new ant tasks - BZip2 and BUnzip2. �These
two tasks use the BZip2 compression algorithm (Visit:
http://sourceware.cygnus.com/bzip2/�for more info.) for
packing and unpacking.
These tasks resemble GZip and GUnzip tasks in input,
input validation, etc. �Hence, I refactored GZip and
GUnzip tasks as well so that the tasks GZip and BZip2
extend from a common base class named Pack, and
GUnzip and BUnzip2 extend from a common base class named
Unpack. �This lays the foundation for creating more Pack
tasks based on different algorithms like lzop, etc. in
the future.
The BZip2 and BUnzip2 tasks depend upon 4 classes:
BZip2Constants.java
CBZip2InputStream.java
CBZip2OutputStream.java
CRC.java
Keiron Liddle (keiron@aftexsw.com) has graciously
accepted to contribute the above code files he has
authored, under ASF license - many thanks to him. �I
have packaged them under org.apache.tools.bzip2,
mimicking the package naming style that has been used
for zip and tar tools we already have. �I have also
given proper credits to him in the code. �Perhaps, this
needs to exist under jakarta-commons, as Stefan had
suggested, but till then...
Submitted by: "Magesh Umasankar" <umagesh@rediffmail.com>
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269919 13f79535-47bb-0310-9956-ffa450edef68
2001-11-15 09:14:10 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>src</td>
|
|
|
|
<td>the file to gzip/bzip/xz.</td>
|
|
|
|
<td>Yes, or a nested resource collection</td>
|
Here are two new ant tasks - BZip2 and BUnzip2. �These
two tasks use the BZip2 compression algorithm (Visit:
http://sourceware.cygnus.com/bzip2/�for more info.) for
packing and unpacking.
These tasks resemble GZip and GUnzip tasks in input,
input validation, etc. �Hence, I refactored GZip and
GUnzip tasks as well so that the tasks GZip and BZip2
extend from a common base class named Pack, and
GUnzip and BUnzip2 extend from a common base class named
Unpack. �This lays the foundation for creating more Pack
tasks based on different algorithms like lzop, etc. in
the future.
The BZip2 and BUnzip2 tasks depend upon 4 classes:
BZip2Constants.java
CBZip2InputStream.java
CBZip2OutputStream.java
CRC.java
Keiron Liddle (keiron@aftexsw.com) has graciously
accepted to contribute the above code files he has
authored, under ASF license - many thanks to him. �I
have packaged them under org.apache.tools.bzip2,
mimicking the package naming style that has been used
for zip and tar tools we already have. �I have also
given proper credits to him in the code. �Perhaps, this
needs to exist under jakarta-commons, as Stefan had
suggested, but till then...
Submitted by: "Magesh Umasankar" <umagesh@rediffmail.com>
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269919 13f79535-47bb-0310-9956-ffa450edef68
2001-11-15 09:14:10 +00:00
|
|
|
</tr>
|
2003-04-17 13:09:19 +00:00
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>destfile</td>
|
|
|
|
<td>the destination file to create.</td>
|
|
|
|
<td rowspan="2">Exactly one of the two</td>
|
2003-04-17 13:09:19 +00:00
|
|
|
</tr>
|
Here are two new ant tasks - BZip2 and BUnzip2. �These
two tasks use the BZip2 compression algorithm (Visit:
http://sourceware.cygnus.com/bzip2/�for more info.) for
packing and unpacking.
These tasks resemble GZip and GUnzip tasks in input,
input validation, etc. �Hence, I refactored GZip and
GUnzip tasks as well so that the tasks GZip and BZip2
extend from a common base class named Pack, and
GUnzip and BUnzip2 extend from a common base class named
Unpack. �This lays the foundation for creating more Pack
tasks based on different algorithms like lzop, etc. in
the future.
The BZip2 and BUnzip2 tasks depend upon 4 classes:
BZip2Constants.java
CBZip2InputStream.java
CBZip2OutputStream.java
CRC.java
Keiron Liddle (keiron@aftexsw.com) has graciously
accepted to contribute the above code files he has
authored, under ASF license - many thanks to him. �I
have packaged them under org.apache.tools.bzip2,
mimicking the package naming style that has been used
for zip and tar tools we already have. �I have also
given proper credits to him in the code. �Perhaps, this
needs to exist under jakarta-commons, as Stefan had
suggested, but till then...
Submitted by: "Magesh Umasankar" <umagesh@rediffmail.com>
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269919 13f79535-47bb-0310-9956-ffa450edef68
2001-11-15 09:14:10 +00:00
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>zipfile</td>
|
|
|
|
<td class="left"><em><u>deprecated</u></em> old name of <var>destfile</var>.</td>
|
Here are two new ant tasks - BZip2 and BUnzip2. �These
two tasks use the BZip2 compression algorithm (Visit:
http://sourceware.cygnus.com/bzip2/�for more info.) for
packing and unpacking.
These tasks resemble GZip and GUnzip tasks in input,
input validation, etc. �Hence, I refactored GZip and
GUnzip tasks as well so that the tasks GZip and BZip2
extend from a common base class named Pack, and
GUnzip and BUnzip2 extend from a common base class named
Unpack. �This lays the foundation for creating more Pack
tasks based on different algorithms like lzop, etc. in
the future.
The BZip2 and BUnzip2 tasks depend upon 4 classes:
BZip2Constants.java
CBZip2InputStream.java
CBZip2OutputStream.java
CRC.java
Keiron Liddle (keiron@aftexsw.com) has graciously
accepted to contribute the above code files he has
authored, under ASF license - many thanks to him. �I
have packaged them under org.apache.tools.bzip2,
mimicking the package naming style that has been used
for zip and tar tools we already have. �I have also
given proper credits to him in the code. �Perhaps, this
needs to exist under jakarta-commons, as Stefan had
suggested, but till then...
Submitted by: "Magesh Umasankar" <umagesh@rediffmail.com>
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269919 13f79535-47bb-0310-9956-ffa450edef68
2001-11-15 09:14:10 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
2018-02-28 07:58:59 +01:00
|
|
|
<h4>any <a href="../Types/resources.html">resource</a> or single element resource collection</h4>
|
2018-03-04 15:17:41 +01:00
|
|
|
<p><em>Since Apache Ant 1.7</em></p>
|
|
|
|
<p>The specified resource will be used as <var>src</var>.</p>
|
2005-11-15 08:31:19 +00:00
|
|
|
|
Here are two new ant tasks - BZip2 and BUnzip2. �These
two tasks use the BZip2 compression algorithm (Visit:
http://sourceware.cygnus.com/bzip2/�for more info.) for
packing and unpacking.
These tasks resemble GZip and GUnzip tasks in input,
input validation, etc. �Hence, I refactored GZip and
GUnzip tasks as well so that the tasks GZip and BZip2
extend from a common base class named Pack, and
GUnzip and BUnzip2 extend from a common base class named
Unpack. �This lays the foundation for creating more Pack
tasks based on different algorithms like lzop, etc. in
the future.
The BZip2 and BUnzip2 tasks depend upon 4 classes:
BZip2Constants.java
CBZip2InputStream.java
CBZip2OutputStream.java
CRC.java
Keiron Liddle (keiron@aftexsw.com) has graciously
accepted to contribute the above code files he has
authored, under ASF license - many thanks to him. �I
have packaged them under org.apache.tools.bzip2,
mimicking the package naming style that has been used
for zip and tar tools we already have. �I have also
given proper credits to him in the code. �Perhaps, this
needs to exist under jakarta-commons, as Stefan had
suggested, but till then...
Submitted by: "Magesh Umasankar" <umagesh@rediffmail.com>
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269919 13f79535-47bb-0310-9956-ffa450edef68
2001-11-15 09:14:10 +00:00
|
|
|
<h3>Examples</h3>
|
2018-02-28 07:58:59 +01:00
|
|
|
<pre><gzip src="test.tar" destfile="test.tar.gz"/></pre>
|
|
|
|
<pre><bzip2 src="test.tar" destfile="test.tar.bz2"/></pre>
|
|
|
|
<pre><xz src="test.tar" destfile="test.tar.xz"/></pre>
|
2018-02-09 06:54:03 +01:00
|
|
|
<pre>
|
2005-11-15 08:31:19 +00:00
|
|
|
<gzip destfile="archive.tar.gz">
|
|
|
|
<url url="http://example.org/archive.tar"/>
|
2018-02-28 07:58:59 +01:00
|
|
|
</gzip></pre>
|
|
|
|
<p>downloads <samp>http://example.org/archive.tar</samp> and compresses it
|
|
|
|
to <samp>archive.tar.gz</samp> in the project's <var>basedir</var> on the fly.</p>
|
2006-09-11 04:33:25 +00:00
|
|
|
|
Here are two new ant tasks - BZip2 and BUnzip2. �These
two tasks use the BZip2 compression algorithm (Visit:
http://sourceware.cygnus.com/bzip2/�for more info.) for
packing and unpacking.
These tasks resemble GZip and GUnzip tasks in input,
input validation, etc. �Hence, I refactored GZip and
GUnzip tasks as well so that the tasks GZip and BZip2
extend from a common base class named Pack, and
GUnzip and BUnzip2 extend from a common base class named
Unpack. �This lays the foundation for creating more Pack
tasks based on different algorithms like lzop, etc. in
the future.
The BZip2 and BUnzip2 tasks depend upon 4 classes:
BZip2Constants.java
CBZip2InputStream.java
CBZip2OutputStream.java
CRC.java
Keiron Liddle (keiron@aftexsw.com) has graciously
accepted to contribute the above code files he has
authored, under ASF license - many thanks to him. �I
have packaged them under org.apache.tools.bzip2,
mimicking the package naming style that has been used
for zip and tar tools we already have. �I have also
given proper credits to him in the code. �Perhaps, this
needs to exist under jakarta-commons, as Stefan had
suggested, but till then...
Submitted by: "Magesh Umasankar" <umagesh@rediffmail.com>
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269919 13f79535-47bb-0310-9956-ffa450edef68
2001-11-15 09:14:10 +00:00
|
|
|
</body>
|
|
|
|
</html>
|