java:
/**
* 解压byte数组类型的Zip
*
* @param data
* @return
* @throws IOException
*/
private static byte[] unZip(byte[] data) throws IOException {
byte[] b = null;
ByteArrayInputStream bis = new ByteArrayInputStream(data);
ZipInputStream zip = new ZipInputStream(bis);
while (zip.getNextEntry() != null) {
byte[] buf = new byte[8096];
int num = -1;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
while ((num = zip.read(buf, 0, buf.length)) != -1) {
baos.write(buf, 0, num);
}
b = baos.toByteArray();
baos.flush();
baos.close();
}
zip.close();
bis.close();
return b;
}
请大神帮忙转成C#代码
你不会C#?
会^_^,已经转好了。