public static ICompressor getCompressor ( final String compressFormat ) throws CompressionException { ICompressor compressor = null ; if ( isValidCompressFormat ( compressFormat ) ) { if ( compressFormat . equalsIgnoreCase ( GZIP_COMPRESS_FORMAT ) ) { compressor = new GZIPCompressor ( ) ; } else if ( compressFormat . equalsIgnoreCase ( DEFLATE_COMPRESS_FORMAT ) ) { compressor = new DeflateCompressor ( ) ; } } return compressor ; }
Method to get the corresponding compressor class for the given compress format