ant.bzip2 module

Compressing/Uncompressing with bzip2

bzip2( ( InputStream inputStream | String fileName )
{ , ( OutputStream outputStream | String fileName ) } )
bunzip2( ( InputStream inputStream | String fileName )
{ , ( OutputStream outputStream | String fileName ) } )

bzip2() compresses data read from the specified inputStream. If outputStream is specified, the compressed data is written to the stream. Otherwise, bzip2() returns a java.io.PipedInputStream object, from which the compressed data can be read.

bunzip2() uncompresses data read from the specified inputStream. If outputStream is specified, the uncompressed data is written to the stream. Otherwise, bunzip2() returns a java.io.PipedInputStream object, from which the uncompressed data can be read.

For example, the following script shows the file list in the file "pnuts.tar.bz2".

readTar(bunzip2("pnuts.tar.bz2"))