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

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `BUF_SIZE` The size to read/write when unzipping a compressed byte array of unknown size.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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