guarana.toolkit.task.streamdealers.compressors
Class ZipCompressor

java.lang.Object
  extended by guarana.toolkit.task.streamdealers.compressors.ZipCompressor
All Implemented Interfaces:
ICompressor

public class ZipCompressor
extends Object
implements ICompressor

A Zip compressor implementation.

Since:
Guaranį SDK 1.0.0
Author:
Rafael Z. Frantz

Constructor Summary
ZipCompressor()
           
 
Method Summary
 byte[] deflate(byte[] data)
          Compress an array of bytes.
 byte[] inflate(byte[] data)
          Uncompress an array of bytes.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZipCompressor

public ZipCompressor()
Method Detail

deflate

public byte[] deflate(byte[] data)
               throws CompressorException
Compress an array of bytes.

Specified by:
deflate in interface ICompressor
Parameters:
data - The array to be deflated.
Returns:
an array of compressed bytes.
Throws:
CompressorException - if this method cannot deflate the data.
See Also:
ICompressor.deflate(byte[])

inflate

public byte[] inflate(byte[] data)
               throws CompressorException
Uncompress an array of bytes.

Specified by:
inflate in interface ICompressor
Parameters:
data - The array to be inflated.
Returns:
an array of uncompressed bytes.
Throws:
CompressorException - if this method cannot inflate the data.
See Also:
ICompressor.inflate(byte[])


Guaranį DSL Home