Interface CompressionMethod


  • public interface CompressionMethod
    An interface to describe a compression method.
    • Method Detail

      • getName

        String getName()
        Gets the compression method name, e.g. "zlib", "lzw", "exi", ...
        Returns:
        The compression method name.
      • decompress

        InputStream decompress​(InputStream inputStream)
                        throws IOException
        Decompresses an input stream.
        Parameters:
        inputStream - The compressed input stream.
        Returns:
        The decompressed input stream.
        Throws:
        IOException - If the decompression failed.
      • compress

        OutputStream compress​(OutputStream outputStream)
                       throws IOException
        Gets the compressed output stream.
        Parameters:
        outputStream - The uncompressed output stream.
        Returns:
        The compressed output stream.
        Throws:
        IOException - If the compression failed.