Here you can find the source of gzipFileReader(String file)
public static BufferedReader gzipFileReader(String file) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.nio.charset.Charset; import java.util.zip.GZIPInputStream; public class Main { public static final Charset UTF8 = Charset.forName("UTF-8"); public static BufferedReader gzipFileReader(String file) throws IOException { return new BufferedReader(new InputStreamReader(new GZIPInputStream(new FileInputStream(file)), UTF8)); }/* w w w . ja v a2 s. c o m*/ public static BufferedReader gzipFileReader(File file) throws IOException { return new BufferedReader(new InputStreamReader(new GZIPInputStream(new FileInputStream(file)), UTF8)); } }