PHP gzcompress() 함수로 압축 된 String을 어떻게 압축 해제 할 수 있습니까?Android : PHP로 압축 된 문자열 압축 해제 gzcompress()
전체 예제가 있습니까?
public static String unzipString(String zippedText) throws Exception
{
ByteArrayInputStream bais = new ByteArrayInputStream(zippedText.getBytes("UTF-8"));
GZIPInputStream gzis = new GZIPInputStream(bais);
InputStreamReader reader = new InputStreamReader(gzis);
BufferedReader in = new BufferedReader(reader);
String unzipped = "";
while ((unzipped = in.readLine()) != null)
unzipped+=unzipped;
return unzipped;
}
을하지만 난 내가하는 PHP gzcompress (-ed) 문자열의 압축을 풀려고하면 제대로 동작하지 않습니다 :
들으
나는 이런 식으로 지금을 시도했다. DEFLATE 알고리즘은 GZIP이기 때문에
사소한 수정을 사용한다. Deflate는 PNG 라이브러리와 같은 다른 도구 도구에서 사용됩니다. – StaxMan