GzipCompressorInputStream is = new GzipCompressorInputStream(new BufferedInputStream( hdfsInputStream)); bufferedInputStream = new BufferedInputStream(is);
String[] nameList = zipfileName.split("/"); String name=nameList[nameList.length-1].replace(".gz",""); String fileName = outputDirectory+"/"+name; FSDataOutputStream hdfsOutStream = fs.create(new Path(fileName)); bufferedOutputStream = new BufferedOutputStream( hdfsOutStream); int b; while ((b = bufferedInputStream.read()) != -1) { bufferedOutputStream.write(b);