java下实现压缩数据存取

使用Apache Commons Compress实现压缩数据存取,支持格式有XZ,7z,tar,zip,jar,bzip2,gzip等。

例子在 https://commons.apache.org/compress/examples.html

而java se包含gzip功能。

InputStream is = new GZIPInputStream(new FileInputStream(file));

原文地址:https://www.cnblogs.com/silvestris/p/5164256.html