public class GzipUtils extends Object
| 构造器和说明 |
|---|
GzipUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static EasyData |
compress(byte[] bytes)
压缩字节数组
|
static EasyData |
compress(EasyData data)
压缩数据
|
static void |
compress(InputStream inputStream,
OutputStream outputStream)
从输入流读取并压缩数据,然后写到输出流中
|
static EasyData |
compress(String str)
压缩字符串
|
static EasyData |
decompress(byte[] bytes)
解压缩字节数组
|
static EasyData |
decompress(EasyData data)
解压缩数据
|
static void |
decompress(InputStream inputStream,
OutputStream outputStream)
从输入流读取并解压缩数据,然后写到输出流中
|
static EasyData |
decompress(String str)
解压缩字符串
|
public static EasyData compress(byte[] bytes) throws IOException
bytes - 字节数组IOException - 压缩过程中的异常public static EasyData compress(String str) throws IOException
str - 字符串IOException - 压缩过程中的异常public static EasyData compress(EasyData data) throws IOException
data - 数据IOException - 压缩过程中的异常public static void compress(InputStream inputStream, OutputStream outputStream) throws IOException
inputStream - 输入流outputStream - 输出流IOException - 压缩过程中的异常public static EasyData decompress(byte[] bytes) throws IOException
bytes - 字节数组IOException - 解压缩过程中的异常public static EasyData decompress(String str) throws IOException
str - 字符串IOException - 解压缩过程中的异常public static EasyData decompress(EasyData data) throws IOException
data - 数据IOException - 解压缩过程中的异常public static void decompress(InputStream inputStream, OutputStream outputStream) throws IOException
inputStream - 输入流outputStream - 输出流IOException - 解压缩过程中的异常Copyright © 2025 EFCloud. All rights reserved.