Interface CompressionCodec

    • Method Detail

      • maxCompressedLength

        int maxCompressedLength​(int sourceLength)
        Provides the maximum compressed size from the source length.
        Parameters:
        sourceLength - size of plain, uncompressed data
        Returns:
        maximum compressed size
      • compress

        OutputStream compress​(OutputStream target)
        Creates an OutputStream to compress data.
        Parameters:
        target - the stream where compressed data will end up
        Returns:
        output stream to write plain data to
      • decompress

        InputStream decompress​(InputStream source)
        Creates an InputStream to read decompressed data from.
        Parameters:
        source - the stream to read compressed data from
        Returns:
        input stream to read decompressed data from
      • code

        byte code()
        Return the code for this type of codec.
        Returns:
        compression code