压缩文件


         ZipFile zip = new ZipFile();

            zip.AddFile("c:\\666.txt");


            MemoryStream output = new MemoryStream();


            zip.Save(output);
            byte[] zipbytes = output.ToArray();




            FileStream fs = File.OpenWrite("c:\\666.zip");
            fs.Write(zipbytes, 0, zipbytes.Length);

            fs.Close();

Dll下载地址:http://files.cnblogs.com/ycdx2001/Ionic.Zip.Reduced.rar

你可能感兴趣的:(压缩文件)