由于InflaterOutputStream在Android上不能使用 所以可以考虑采用 Inflater和inflate import java.util.zip.Inflater; // Decompress the bytes // 开始解压, Inflater decompresser = new Inflater(); decompresser.setInput(bytes, 0, bytes.length); // 对byte[]进行解压,同时可以要解压的数据包中的某一段数据,就好像从zip中解压出某一个文件一样。 byte[] result = new byte[bytes.length]; int resultLength = decompresser.inflate(result); // 返回的是解压后的的数据包大小, decompresser.end();