核心SDK提交

This commit is contained in:
ZZX9599
2025-09-08 17:06:22 +08:00
commit 7964ce1569
57 changed files with 2060 additions and 0 deletions

View File

@ -0,0 +1,23 @@
package com.yjdsj.common.utils;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
public class DecompressionUtil {
/**
* 将压缩数据解压并转换为字符串
*
* @param compressedData
* @return
*/
public static String decompressAndConvertToString(byte[] compressedData) {
try {
byte[] decompressedData = GzipDecompressorUtil.decompress(compressedData);
return new String(decompressedData, StandardCharsets.UTF_8);
} catch (IOException e) {
e.printStackTrace();
return "Failed to decompress data: " + e.getMessage();
}
}
}