当前位置: 首页 > news >正文

临安做网站的公司有哪些做网站卖菜刀需要什么手续

临安做网站的公司有哪些,做网站卖菜刀需要什么手续,商城网站建设,怎么在百度上发广告真是折腾呀#xff0c;网上虽然有不少的源码但测试几个就是不成功#xff0c;经过折腾还是折腾出来了现在分享出来给大家。 源码还是在网友们的基础上调整的#xff0c;主要是调整源码大大小写格式。 sharpziplib.dll 下载#xff1a;http://pan.baidu.com/share/link?sh…真是折腾呀网上虽然有不少的源码但测试几个就是不成功经过折腾还是折腾出来了现在分享出来给大家。 源码还是在网友们的基础上调整的主要是调整源码大大小写格式。 sharpziplib.dll 下载http://pan.baidu.com/share/link?shareid1016448925uk134565274fid3214033513 首先需要在项目里引用sharpziplib.dll ZipClass.cs 类函数 包括压缩和解压 using System; using System.Text; using System.Collections; using System.IO; using System.Diagnostics; using System.Runtime.Serialization.Formatters.Binary; using System.Data; using ICSharpCode.SharpZipLib.BZip2; using ICSharpCode.SharpZipLib.Zip; using ICSharpCode.SharpZipLib.Zip.Compression; using ICSharpCode.SharpZipLib.Zip.Compression.Streams; using ICSharpCode.SharpZipLib.GZip; using ICSharpCode.SharpZipLib.Checksums; namespace Updatezip {#region 压缩文件类/// summary/// 压缩文件 /// /summarypublic class ZipClass{public void ZipFile(string FileToZip, string ZipedFile, int CompressionLevel, int BlockSize){//如果文件没有找到则报错 if (!System.IO.File.Exists(FileToZip)){throw new System.IO.FileNotFoundException(The specified file FileToZip could not be found. Zipping aborderd);}System.IO.FileStream StreamToZip new System.IO.FileStream(FileToZip, System.IO.FileMode.Open, System.IO.FileAccess.Read);System.IO.FileStream ZipFile System.IO.File.Create(ZipedFile);ZipOutputStream ZipStream new ZipOutputStream(ZipFile);ZipEntry ZipEntry new ZipEntry(ZippedFile);ZipStream.PutNextEntry(ZipEntry);ZipStream.SetLevel(CompressionLevel);byte[] buffer new byte[BlockSize];System.Int32 size StreamToZip.Read(buffer, 0, buffer.Length);ZipStream.Write(buffer, 0, size);try{while (size StreamToZip.Length){int sizeRead StreamToZip.Read(buffer, 0, buffer.Length);ZipStream.Write(buffer, 0, sizeRead);size sizeRead;}}catch (System.Exception ex){throw ex;}ZipStream.Finish();ZipStream.Close();StreamToZip.Close();}public void ZipFileMain(string[] args){string[] filenames Directory.GetFiles(args[0]);Crc32 Crc new Crc32();ZipOutputStream s new ZipOutputStream(File.Create(args[1]));s.SetLevel(6); // 0 - store only to 9 - means best compression foreach (string file in filenames){//打开压缩文件 FileStream fs File.OpenRead(file);byte[] buffer new byte[fs.Length];fs.Read(buffer, 0, buffer.Length);ZipEntry entry new ZipEntry(file);entry.DateTime DateTime.Now;// set Size and the crc, because the information // about the size and crc should be stored in the header // if it is not set it is automatically written in the footer. // (in this case size crc -1 in the header) // Some ZIP programs have problems with zip files that dont store // the size and crc in the header. entry.Size fs.Length;fs.Close();Crc.Reset();Crc.Update(buffer);entry.Crc Crc.Value;s.PutNextEntry(entry);s.Write(buffer, 0, buffer.Length);}s.Finish();s.Close();}} #endregion#region 解压文件类/// summary/// 解压文件/// /summarypublic class UnZipClass{public void UnZip(string[] args){ZipInputStream s new ZipInputStream(File.OpenRead(args[0]));ZipEntry theEntry;while ((theEntry s.GetNextEntry()) ! null){string directoryName Path.GetDirectoryName(args[1]);string fileName Path.GetFileName(theEntry.Name);//生成解压目录 Directory.CreateDirectory(directoryName);if (fileName ! String.Empty){//解压文件到指定的目录 FileStream streamWriter File.Create(args[1] theEntry.Name);int size 2048;byte[] data new byte[2048];while (true){size s.Read(data, 0, data.Length);if (size 0){streamWriter.Write(data, 0, size);}else{break;}}streamWriter.Close();}}s.Close();}} #endregion }调用方法 /// summary /// 调用源码 /// /summary private void button2_Click_1(object sender, System.EventArgs e) { string[] FileProperties new string[2]; FileProperties[0] C:\\unzipped\\;//待压缩文件目录 FileProperties[1] C:\\zip\\a.zip; //压缩后的目标文件 ZipClass Zc new ZipClass(); Zc.ZipFileMain(FileProperties); } private void button2_Click(object sender, System.EventArgs e) { string[] FileProperties new string[2]; FileProperties[0] C:\\zip\\test.zip;//待解压的文件 FileProperties[1] C:\\unzipped\\;//解压后放置的目标目录 UnZipClass UnZc new UnZipClass(); UnZc.UnZip(FileProperties); }
http://www.hkea.cn/news/14515967/

相关文章:

  • 网站生成手机站怎么利用网站做cpa推广
  • 天津北辰做网站怎样做网站优化 知乎
  • 网站建设velpai企业信用公示信息系统(全国)官网
  • 杭州网站推广宣传WordPress鼠标点击特效
  • 网站免费正能量软件下载视频企业网站建设版本
  • dede 网站根目录网站带做收录排名
  • 一个企业网站做几个关键词新媒体营销图片
  • 南京企业网站设计公司500元wordpress单用户商城
  • 项目运营方案襄阳seo费用
  • 简单网站开发项目实例下载17网一起做网店
  • 穷人创业一千元以下的东莞seo排名优化
  • 网站建设实验代码深圳网站建设软件开发公司排名
  • 网站建设与运营公司主营业务收入与成本北京小程序 app开发公司
  • 图片 展示 网站模板上海城乡住房建设厅网站
  • 网站开发专业就业指导手机wordpress
  • 中远智达网站建设免费排版网站
  • 网站建设教程给赚湖南岚鸿官 网自适应网站好吗
  • 杭州网站制作服务做防护信息的网站
  • 如何申请域名建立网站怎么做网站的步骤
  • 北京网站制作建设学生个人博客网站模板
  • 网站ftp管理工具全面的苏州网站建设
  • seo网站排名软件cmd iis重启单个网站
  • 营销型网站重要特点是?建设网站 软件推荐
  • 提供邢台网站优化wordpress主题+演示数据
  • 免费vi模板网站wordpress仿简书主题
  • 网站建设公司郑州手机网站制作软件
  • 什么网站建设策划方案 论文网站排名优化工薪待遇
  • 起名最好的网站排名专业视频网站开发公司
  • 网站的策划方案怎么写东莞建设网首页
  • 接单干活的平台哈尔滨优化seo外包公司