anon.util
Class BZip2Tools

java.lang.Object
  extended by anon.util.BZip2Tools

public class BZip2Tools
extends java.lang.Object

This class provides some utility methods for BZip2 compression.


Constructor Summary
BZip2Tools()
           
 
Method Summary
static byte[] compress(byte[] a_data)
          Compresses the specified data with BZip2.
static byte[] decompress(byte[] a_data)
          Decompresses the specified data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BZip2Tools

public BZip2Tools()
Method Detail

compress

public static byte[] compress(byte[] a_data)
Compresses the specified data with BZip2.

Parameters:
a_data - The data to compress.
Returns:
The compressed data or null, if there was an error while the compression.

decompress

public static byte[] decompress(byte[] a_data)
Decompresses the specified data.

Parameters:
a_data - The BZip2 compressed data (whole block, not only parts).
Returns:
The uncompressed data or null, if the specified data are not BZip2 compressed.