上一页 1 ··· 4 5 6 7 8
摘要: using (FileStream outStream = new FileStream(@"D:\12.txt", FileMode.Open)) { using (FileStream fs = new FileStream(@"D:\1.txt", FileMode.Open)) { //缓冲区太小的话,速度慢而且伤硬盘 //声明一个4兆字节缓冲区大小,比如迅雷也有一个缓冲区,如果没有缓冲区的话, ... 阅读全文
posted @ 2014-03-07 18:07 wangjinming 阅读(4392) 评论(0) 推荐(0) 编辑
摘要: Ibuffer转byte[] byte[] bytes=WindowsRuntimeBufferExtensions.ToArray(buffer,0,(int)buffer.Length); Byte[]转Ibuffer WindowsRuntimeBufferExtensions.AsBuffer(bytes,0,bytes.Length); IRandomAccessStream转 StreamStream stream=WindowsRuntimeStreamExtensions.AsStreamForRead(randomStream.GetInputStreamAt(0));Ibu 阅读全文
posted @ 2014-03-06 11:49 wangjinming 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 下面的例子是从zip压缩文件解压出jpg文件流,再显示出来。StorageFile zip = await KnownFolders.PicturesLibrary.GetFileAsync("1.zip"); using (ZipArchive archive = new ZipArchive((await zip.OpenAsync(FileAccessMode.ReadWrite)).AsStream(), ZipArchiveMode.Update)) { InMemoryRandomAccessStream ras... 阅读全文
posted @ 2014-03-06 11:33 wangjinming 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 在1.zip中增加一张新图片StorageFile jpg = await KnownFolders.PicturesLibrary.GetFileAsync("1.jpg"); StorageFile zip = await KnownFolders.PicturesLibrary.GetFileAsync("1.zip"); //把上面这句改成如下就成了压缩文件 //StorageFile zip = await KnownFolders.PicturesLibrary.CreateFileAsync(jpg.Display... 阅读全文
posted @ 2014-03-05 17:06 wangjinming 阅读(346) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8