public class GzipUtils extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
GZIP_ENCODE_ISO_8859_1 |
static String |
GZIP_ENCODE_UTF_8 |
| 构造器和说明 |
|---|
GzipUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
compress(String str)
字符串压缩为GZIP字节数组
|
static byte[] |
compress(String str,
String encoding)
字符串压缩为GZIP字节数组
|
static byte[] |
uncompress(byte[] bytes)
GZIP解压缩
|
static String |
uncompressToString(byte[] bytes) |
static String |
uncompressToString(byte[] bytes,
String encoding) |
public static byte[] compress(String str)
str - public static byte[] compress(String str, String encoding)
str - encoding - public static byte[] uncompress(byte[] bytes)
bytes - public static String uncompressToString(byte[] bytes)
bytes - Copyright © 2025. All rights reserved.