Here you can find the source of decompressFile(InputStream is, OutputStream os)
public static void decompressFile(InputStream is, OutputStream os)
//package com.java2s; //License from project: BSD License import java.io.*; import java.util.zip.InflaterInputStream; public class Main { public static void decompressFile(InputStream is, OutputStream os) { InflaterInputStream iis = new InflaterInputStream(is); try {/*from ww w . jav a2 s . c o m*/ int i = 1024; byte[] buf = new byte[i]; while ((i = iis.read(buf, 0, i)) > 0) { os.write(buf, 0, i); } } catch (IOException e) { e.printStackTrace(); } } }