Package com.luna.common.file.compress
Class Gzip
java.lang.Object
com.luna.common.file.compress.Gzip
- All Implemented Interfaces:
Closeable
,AutoCloseable
GZIP是用于Unix系统的文件压缩
gzip的基础是DEFLATE
gzip的基础是DEFLATE
- Since:
- 5.7.8
- Author:
- looly
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
获取目标流gzip()
将普通数据流压缩static Gzip
of
(InputStream source, OutputStream target) 创建GzipunGzip()
将压缩流解压到target中
-
Constructor Details
-
Gzip
构造- Parameters:
source
- 源流target
- 目标流
-
-
Method Details
-
of
创建Gzip- Parameters:
source
- 源流target
- 目标流- Returns:
- Gzip
-
getTarget
获取目标流- Returns:
- 目标流
-
gzip
将普通数据流压缩- Returns:
- Gzip
-
unGzip
将压缩流解压到target中- Returns:
- Gzip
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-