Here you can find the source of gunzipFile(File inputGZippedFile, File outputFile)
public static void gunzipFile(File inputGZippedFile, File outputFile) throws java.io.FileNotFoundException, java.io.IOException
//package com.java2s; //License from project: Open Source License import java.io.File; public class Main { /**//from www. ja v a2 s . co m * Gunzips one file from the inputGZippedFile and unzips to outputUnZippedFile */ public static void gunzipFile(File inputGZippedFile, File outputFile) throws java.io.FileNotFoundException, java.io.IOException { java.util.zip.GZIPInputStream input = new java.util.zip.GZIPInputStream( new java.io.FileInputStream(inputGZippedFile)); java.io.FileOutputStream output = new java.io.FileOutputStream(outputFile); //java.util.zip.GZIPOutputStream output = new java.util.zip.GZIPOutputStream(); int buffersize = 100; byte[] buf = new byte[buffersize]; int read = input.read(buf, 0, buffersize); while (read != -1) { output.write(buf, 0, read); read = input.read(buf, 0, buffersize); } input.close(); output.close(); } }