Package org.aoju.bus.core.compress
Class Deflate
java.lang.Object
org.aoju.bus.core.compress.Deflate
- All Implemented Interfaces:
Closeable,AutoCloseable
Deflate算法 Deflate是同时使用了LZ77算法与哈夫曼编码(Huffman Coding)的一个无损数据压缩算法
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()deflater(int level) 将普通数据流压缩获取目标流inflater()将压缩流解压到target中static Deflateof(InputStream source, OutputStream target, boolean nowrap) 创建Deflate
-
Constructor Details
-
Deflate
构造- Parameters:
source- 源流target- 目标流nowrap-true表示兼容Gzip压缩
-
-
Method Details
-
of
创建Deflate- Parameters:
source- 源流target- 目标流nowrap-true表示兼容Gzip压缩- Returns:
- this
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
getTarget
-
deflater
-
inflater
-