src/com/esotericsoftware/scar/Scar.java
static public String gzip (String file, String gzipFile) throws IOException {
		if (file == null) throw new IllegalArgumentException("file cannot be null.");
		if (gzipFile == null) throw new IllegalArgumentException("gzipFile cannot be null.");

		if (DEBUG) debug("scar", "GZIP encoding: " + file + " -> " + gzipFile);

		GZIPOutputStream output = new GZIPOutputStream(new FileOutputStream(gzipFile));
		try {
			copyStream(new FileInputStream(file), output);
		} finally {
			try {
				output.close();
			} catch (Exception ignored) {
			}
		}
		return gzipFile;
	}
/** Encodes the specified file with GZIP.
	 * @return The path to the encoded file. */
Encodes the specified file with GZIP.
@return The path to the encoded file.
Encodes the specified file with GZIP . @return The path to the encoded file .
static public String gzip (String file, String gzipFile) throws IOException {
		if (file == null) throw new IllegalArgumentException("file cannot be null.");
		if (gzipFile == null) throw new IllegalArgumentException("gzipFile cannot be null.");
		if (DEBUG) debug("scar", "GZIP encoding: " + file + " -> " + gzipFile);
		GZIPOutputStream output = new GZIPOutputStream(new FileOutputStream(gzipFile));
		try {
			copyStream(new FileInputStream(file), output);
		} finally {
			try {
				output.close();
			} catch (Exception ignored) {
			}
		}
		return gzipFile;
	}
static public String gzip ( String file , String gzipFile ) throws IOException { if ( file == null ) throw new IllegalArgumentException ( "file cannot be null." ) ; if ( gzipFile == null ) throw new IllegalArgumentException ( "gzipFile cannot be null." ) ; if ( DEBUG ) debug ( "scar" , "GZIP encoding: " + file + " -> " + gzipFile ) ; GZIPOutputStream output = new GZIPOutputStream ( new FileOutputStream ( gzipFile ) ) ; try { copyStream ( new FileInputStream ( file ) , output ) ; } finally { try { output . close ( ) ; } catch ( Exception ignored ) { } } return gzipFile ; }
Encodes the specified file with GZIP.
Encodes the specified file with GZIP .