版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/inforstack/article/details/70051496
public static void main(String[] args) throws Exception {
String fileName = "C:\\Users\\cluo\\Desktop\\2017041016.gz";
InputStream in = new GZIPInputStream(new FileInputStream(fileName));
List<String> list = IOUtils.readLines(in, "UTF-8");
list.forEach(s -> System.out.println(s));
}