将压缩后的输入流解压缩到输出流。
//package com.nowjava; /** 来 自 时代Java **/ import java.io.IOException; import java.io.OutputStream; import java.util.zip.GZIPInputStream; public class Main { /** * UnGzip an gzipped input stream to an output stream. You need to close streams manually. * @param gzippedInputStream * @param ungzippedOutputStream * @throws IOException */ public static void unGzip(GZIPInputStream gzippedInputStream, OutputStream ungzippedOutputStream) throws IOException { byte[] buffer = new byte[1024]; int len = -1;