用 GZipInputStream 去读一个gz文件(200MB),但是结果却不完整(500MB)
实际界压缩应该是(1.4GB)
听说Java built in Zip implementation本来就有毛病,不知道大家有没有其他方法,
比如其3rd party code。
code snap:
FileInputStream inputStream = new FileInputStream(file);
GZIPInputStream gz = new GZIPInputStream(inputStream);
BufferedReader br = new BufferedReader(new InputStreamReader(gz));
String line = "";
while((line=br.readLine())!=null){
//do stuff
}