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">
|
2002-02-03 22:00:42 +00:00
|
|
|
<title>GZip/BZip2 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>
|
|
|
|
|
|
|
|
<h2><a name="pack">GZip/BZip2</a></h2>
|
|
|
|
<h3>Description</h3>
|
2005-11-15 08:31:19 +00:00
|
|
|
<p>Packs a resource using the GZip or BZip2 algorithm.
|
2002-04-10 14:13:59 +00:00
|
|
|
The output file is only generated if it doesn't exist or the source
|
2005-11-15 08:31:19 +00:00
|
|
|
resource is newer.</p>
|
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>
|
|
|
|
<table border="1" cellpadding="2" cellspacing="0">
|
|
|
|
<tr>
|
|
|
|
<td valign="top"><b>Attribute</b></td>
|
|
|
|
<td valign="top"><b>Description</b></td>
|
|
|
|
<td align="center" valign="top"><b>Required</b></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">src</td>
|
2001-12-21 20:08:33 +00:00
|
|
|
<td valign="top">the file to gzip/bzip.</td>
|
2005-11-15 08:31:19 +00:00
|
|
|
<td align="center" valign="top">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>
|
|
|
|
<td valign="top">destfile</td>
|
|
|
|
<td valign="top">the destination file to create.</td>
|
|
|
|
<td align="center" valign="top" rowspan="2">Exactly one of the two.</td>
|
|
|
|
</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>
|
2001-12-21 20:08:33 +00:00
|
|
|
<td valign="top">zipfile</td>
|
2003-04-17 13:09:19 +00:00
|
|
|
<td valign="top">the <i>deprecated</i> old name of destfile.</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>
|
2005-11-15 08:31:19 +00:00
|
|
|
<h4>any <a href="../CoreTypes/resources.html">resource</a> or single element
|
|
|
|
resource collection</h4>
|
|
|
|
|
|
|
|
<p>The specified resource will be used as src.</p>
|
|
|
|
|
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>
|
2005-03-08 18:17:40 +00:00
|
|
|
<blockquote><pre>
|
|
|
|
<gzip src="test.tar" destfile="test.tar.gz"/>
|
|
|
|
</pre></blockquote>
|
|
|
|
<blockquote><pre>
|
|
|
|
<bzip2 src="test.tar" destfile="test.tar.bz2"/>
|
|
|
|
</pre></blockquote>
|
2005-11-15 08:31:19 +00:00
|
|
|
<blockquote><pre>
|
|
|
|
<gzip destfile="archive.tar.gz">
|
|
|
|
<url url="http://example.org/archive.tar"/>
|
|
|
|
</gzip>
|
|
|
|
</pre></blockquote>
|
|
|
|
<p>downloads <i>http://example.org/archive.tar</i> and compresses it
|
|
|
|
to <i>archive.tar.gz</i> in the project's basedir on the fly.</p>
|
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
|
|
|
<hr>
|
2005-03-07 18:09:10 +00:00
|
|
|
<p align="center">Copyright © 2000-2005 The Apache Software Foundation. All rights
|
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
|
|
|
Reserved.</p>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|