摘要:
首先,到http://www.componentace.com/下载zlib.net,找到bin目录中的zlib.net.dll添加引用到项目中。/// <summary>/// 压缩字符串/// </summary>/// <param name="SourceString">需要被压缩的字符串</param>/// <returns></returns>public static string CompressString(string SourceString){ byte[] byteSourc 阅读全文
posted @ 2013-01-27 14:39
yayadoudou
阅读(1006)
评论(0)
推荐(0)
摘要:
Stream转换为byte数组:/// <summary> /// 将 Stream 转成 byte[] /// </summary> public static byte[] StreamToBytes(Stream stream){ byte[] bytes = new byte[stream.Length]; stream.Read(bytes, 0, bytes.Length); // 设置当前流的位置为流的开始 stream.Seek(0, SeekOrigin.Begin); return bytes;}byte数组转换为Stream:/// <su. 阅读全文
posted @ 2013-01-27 11:58
yayadoudou
阅读(858)
评论(0)
推荐(0)
浙公网安备 33010602011771号