
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
24 years ago 
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
24 years ago |
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <html>
-
- <head>
- <meta http-equiv="Content-Language" content="en-us">
- <title>Apache Ant User Manual</title>
- </head>
-
- <body>
-
- <h2><a name="unpack">GUnzip/BUnzip2</a></h2>
- <h3>Description</h3>
- <p>Expands a file packed using GZip or BZip2.</p>
-
- <p>If <i>dest</i> is a directory the name of the destination file is
- the same as <i>src</i> (with the ".gz" or ".bz2"
- extension removed if present). If <i>dest</i> is omitted, the parent
- dir of <i>src</i> is taken. The file is only expanded if the source
- file is newer than the destination file, or when the destination file
- does not exist.</p>
-
- <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>
- <td valign="top">the file to expand.</td>
- <td align="center" valign="top">Yes</td>
- </tr>
- <tr>
- <td valign="top">dest</td>
- <td valign="top">the destination file or directory.</td>
- <td align="center" valign="top">No</td>
- </tr>
- </table>
- <h3>Examples</h3>
- <blockquote>
- <p><code><gunzip src="test.tar.gz"/></code></p>
- </blockquote>
- <p>expands <i>test.tar.gz</i> to <i>test.tar</i></p>
- <blockquote>
- <p><code><bunzip2 src="test.tar.bz2"/></code></p>
- </blockquote>
- <p>expands <i>test.tar.bz2</i> to <i>test.tar</i></p>
- <blockquote>
- <p><code><gunzip src="test.tar.gz" dest="test2.tar"/></code></p>
- </blockquote>
- <p>expands <i>test.tar.gz</i> to <i>test2.tar</i></p>
- <blockquote>
- <p><code><gunzip src="test.tar.gz" dest="subdir"/></code></p>
- </blockquote>
- <p>expands <i>test.tar.gz</i> to <i>subdir/test.tar</i> (assuming
- subdir is a directory).</p>
-
- <hr>
- <p align="center">Copyright © 2001 Apache Software Foundation. All rights
- Reserved.</p>
-
- </body>
- </html>
|