CITS2200
Interface Compressor


public interface Compressor

This interface describes the operations to compress and decompress a file, using a variety of algorithms.


Method Summary
 String compress(InputStream in, OutputStream out)
          Reads a series of bytes from an inputstream and executes a compression algorithm over those bytes, writing the compressed data to the specified outputStream.
 String decompress(InputStream in, OutputStream out)
          Reads a series of bytes from compressed data and executes a decompression algorithm over those bytes, writing the decompressed data to the specified outputStream.
 

Method Detail

compress

String compress(InputStream in,
                OutputStream out)
Reads a series of bytes from an inputstream and executes a compression algorithm over those bytes, writing the compressed data to the specified outputStream.

Parameters:
in - the InputStream for the data
out - the outputStream for writing the compressed data
Returns:
a String reporting information to be logged.

decompress

String decompress(InputStream in,
                  OutputStream out)
Reads a series of bytes from compressed data and executes a decompression algorithm over those bytes, writing the decompressed data to the specified outputStream.

Parameters:
in - the InputStream for the compressed data
out - the outputStream for writing the decompressed data
Returns:
a String reporting information to be logged.