Class ZlibDeflate

    • Constructor Detail

      • ZlibDeflate

        public ZlibDeflate()
    • Method Detail

      • decompress

        public static byte[] decompress​(byte[] bytes,
                                        int expectedSize)
                                 throws ImageReadException
        Compress the byte[] using ZLIB deflate decompression.
        Parameters:
        bytes - The bytes to decompress
        expectedSize - The expected size of the decompressed byte[].
        Returns:
        The decompressed bytes.
        Throws:
        ImageReadException - if the bytes could not be decompressed.
        See Also:
        Inflater
      • compress

        public static byte[] compress​(byte[] bytes)
                               throws ImageWriteException
        Compress the byte[] using ZLIB deflate compression.
        Parameters:
        bytes - The bytes to compress
        Returns:
        The compressed bytes.
        Throws:
        ImageWriteException - if the bytes could not be compressed.
        See Also:
        DeflaterOutputStream