Class DeflateUtils


  • public class DeflateUtils
    extends Object
    Deflate (RFC 1951) utilities.
    Version:
    2013-04-16
    Author:
    Vladimir Dzhuvinov
    • Method Detail

      • compress

        public static byte[] compress​(byte[] bytes)
                               throws IOException
        Compresses the specified byte array according to the DEFLATE specification (RFC 1951).
        Parameters:
        bytes - The byte array to compress. Must not be null.
        Returns:
        The compressed bytes.
        Throws:
        IOException - If compression failed.
      • decompress

        public static byte[] decompress​(byte[] bytes)
                                 throws IOException
        Decompresses the specified byte array according to the DEFLATE specification (RFC 1951).
        Parameters:
        bytes - The byte array to decompress. Must not be null.
        Returns:
        The decompressed bytes.
        Throws:
        IOException - If decompression failed.