first commit

This commit is contained in:
T00700
2022-12-02 13:36:22 +08:00
commit 236efd9a7f
1515 changed files with 326020 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
package com.github.catvod.utils;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.zip.GZIPInputStream;
public class gZip {
public static String KS(byte[] bArr) throws IOException {
GZIPInputStream gZIPInputStream = new GZIPInputStream(new ByteArrayInputStream(bArr));
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
byte[] bArr2 = new byte[1024];
while (true) {
int read = gZIPInputStream.read(bArr2);
if (read == -1) {
return byteArrayOutputStream.toString("UTF-8");
}
byteArrayOutputStream.write(bArr2, 0, read);
}
}
}