InflaterInputStream to unzip : InflaterInputStream « File « Java Tutorial






import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.zip.InflaterInputStream;

public class Main {

  public static void main(String[] args) throws Exception {

    FileInputStream fin = new FileInputStream("a.dat");
    InflaterInputStream iis = new InflaterInputStream(fin);
    FileOutputStream fout = new FileOutputStream("b.dat");
    for (int c = iis.read(); c != -1; c = iis.read()) {
      fout.write(c);
    }
    fout.close();

  }
}








11.68.InflaterInputStream
11.68.1.InflaterInputStream to unzip