自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(0)
  • 资源 (5)
  • 收藏
  • 关注

空空如也

SMS短信猫开发收集整理的代码和文档

之前开发过一个短信猫、8口短信池的系统,收集了一些代码和相关资料,包括串口通信、AT指令、超长短信发送接收等,节省不少资料收集时间,相信对需要的朋友起到一定帮助

2013-02-26

CompactFormatterPlus

CompactFormatterPlus是CompactFormatter的进阶版,作了很大改进,支持更多类型: All primitive types Arrays of primitive types DateTime ArrayList Hashtable List<T> Dictionary<T Key, T1 Value> DataSet DataTable Complex objects composed of the above types 用法跟CompactFormatter基本相同

2010-03-28

SharpZipLib .net压缩库

.net压缩库 SharpZipLib,支持net1.1、net2.0、netCF2.0框架,下面是用法示例: using System; using System.Text; using System.IO; using ICSharpCode.SharpZipLib; namespace SerializableJob.Compression { public enum CompressionType { GZip, BZip2, Zip } public class Compression { public static CompressionType CompressionProvider = CompressionType.GZip; private static Stream OutputStream(Stream inputStream) { switch (CompressionProvider) { case CompressionType.BZip2: return new ICSharpCode.SharpZipLib.BZip2.BZip2OutputStream(inputStream); case CompressionType.GZip: return new ICSharpCode.SharpZipLib.GZip.GZipOutputStream(inputStream); case CompressionType.Zip: return new ICSharpCode.SharpZipLib.Zip.ZipOutputStream(inputStream); default: return new ICSharpCode.SharpZipLib.GZip.GZipOutputStream(inputStream); } } private static Stream InputStream(Stream inputStream) { switch (CompressionProvider) { case CompressionType.BZip2: return new ICSharpCode.SharpZipLib.BZip2.BZip2InputStream(inputStream); case CompressionType.GZip: return new ICSharpCode.SharpZipLib.GZip.GZipInputStream(inputStream); case CompressionType.Zip: return new ICSharpCode.SharpZipLib.Zip.ZipInputStream(inputStream); default: return new ICSharpCode.SharpZipLib.GZip.GZipInputStream(inputStream); } } public static byte[] Compress(byte[] bytesToCompress) { MemoryStream ms = new MemoryStream(); Stream s = OutputStream(ms); s.Write(bytesToCompress, 0, bytesToCompress.Length); s.Close(); return ms.ToArray(); } public static string Compress(string stringToCompress) { byte[] compressedData = CompressToByte(stringToCompress); string strOut = Convert.ToBase64String(compressedData); return strOut; } public static byte[] CompressToByte(string stringToCompress) { byte[] bytData = Encoding.Unicode.GetBytes(stringToCompress); return Compress(bytData); } public string DeCompress(string stringToDecompress) { string outString = string.Empty; if (stringToDecompress == null) { throw new ArgumentNullException(stringToDecompress, "You tried to use an empty string"); } try { byte[] inArr = Convert.FromBase64String(stringToDecompress.Trim()); outString = System.Text.Encoding.Unicode.GetString(DeCompress(inArr)); } catch (NullReferenceException nEx) { return nEx.Message; } return outString; } public static byte[] DeCompress(byte[] bytesToDecompress) { byte[] writeData = new byte[4096]; Stream s2 = InputStream(new MemoryStream(bytesToDecompress)); MemoryStream outStream = new MemoryStream(); while (true) { int size = s2.Read(writeData, 0, writeData.Length); if (size > 0) { outStream.Write(writeData, 0, size); } else { break; } } s2.Close(); byte[] outArr = outStream.ToArray(); outStream.Close(); return outArr; } } }

2010-03-23

CompactFormatter 1.0 带源码

.NET CF 不支持二进制序列化,CompactFormatter 弥补了这方面的缺陷。

2010-03-23

DotNetBar 8.2.0.2 破解,测试可用

DotNetBar 8.2.0.2 破解版,测试可用

2010-03-11

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除