Java/File Input Output/InflaterInputStream
Версия от 18:01, 31 мая 2010; (обсуждение)
InflaterInputStream to unzip
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();
}
}