gziPReader = new BufferedReader(new InputStreamReader(new GZIPInputStream(new FileInputStream(fileName))));
这行代码可以让我们同时在一行中读取整个文件,看一下下面的结果:
C:〉java Zip test.txt.gz contents of test.txt.gz... line of this test file that is compressed. line of this test file that is compressed. line of this test file that is compressed. line of this test file that is compressed. line of this test file that is compressed. line of this test file that is compressed. line of this test file that is compressed. line of this test file that is compressed. line of this test file that is compressed. line of this test file that is compressed.