Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.crosswire.common.compress
Interface Compressor

All Known Implementing Classes:
  AbstractCompressor, BZip2, Gzip, LZSS, XZ, Zip

    public interface Compressor

A compressor provides the ability to compress and uncompress block text. Implementing classes are expected to provide a way to supply the input.

Author:
  DM Smith
See Also:
  `The GNU Lesser General Public License for details.`

Field Summary
`static int` | `BUF_SIZE` The size to read/write when unzipping a compressed byte array of unknown size.

Method Summary
`ByteArrayOutputStream` | `compress()` Compresses the input and provides the result.
`ByteArrayOutputStream` | `uncompress()` Uncompresses the input and provides the result.
`ByteArrayOutputStream` | `uncompress(int expectedLength)` Uncompresses the input and provides the result.

Field Detail

### BUF_SIZE

    static final int BUF_SIZE

  The size to read/write when unzipping a compressed byte array of unknown size.

  See Also:
    Constant Field Values

Method Detail

### compress

    ByteArrayOutputStream compress()
                                   throws IOException

  Compresses the input and provides the result.

  Returns:
    the compressed result
  Throws:
    `IOException` - if an exception is encountered

### uncompress

    ByteArrayOutputStream uncompress()
                                     throws IOException

  Uncompresses the input and provides the result.

  Returns:
    the uncompressed result
  Throws:
    `IOException` - if an exception is encountered

### uncompress

    ByteArrayOutputStream uncompress(int expectedLength)
                                     throws IOException

  Uncompresses the input and provides the result.

  Parameters:
    `expectedLength` - the size of the result buffer
  Returns:
    the uncompressed result
  Throws:
    `IOException` - if an exception is encountered

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¨ 2003-2015
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD