首页 新闻 赞助 找找看

java ZipInputStream转成C#对应的代码怎么转

0
悬赏园豆:20 [待解决问题]

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#代码

弦断有谁听的主页 弦断有谁听 | 初学一级 | 园豆:20
提问于:2016-10-13 17:47
< >
分享
所有回答(1)
0

你不会C#?

顾晓北 | 园豆:10844 (专家六级) | 2016-10-14 09:15

会^_^,已经转好了。

支持(0) 反对(0) 弦断有谁听 | 园豆:20 (初学一级) | 2016-10-17 09:44
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册