code: public static void compress(int format, Resource source, Resource target, boolean includeBaseFolder, int mode) throws IOException {
  	if (format == FORMAT_GZIP) compressGZip(source, target);
  	else if (format == FORMAT_BZIP2) compressBZip2(source, target);
  	else {
  	    Resource[] sources = (!includeBaseFolder && source.isDirectory()) ? source.listResources() : new Resource[] { source };
  	    compress(format, sources, target, mode);
  	}
      }
docs: compress data to a zip file
  
  @param format format it that should by compressed usually is CompressUtil.FORMAT_XYZ
  @param source
  @param target
  @param includeBaseFolder
  @param mode
  @throws IOException