¡@

Home 

2014/10/16 ¤W¤È 08:19:13

android Programming Glossary: memorystream

How can I Zip and Unzip a string using GZIPOutputStream that is compatible with .Net?

http://stackoverflow.com/questions/6717165/how-can-i-zip-and-unzip-a-string-using-gzipoutputstream-that-is-compatible-with

sReturn else return .Net methods public static string compress string text byte buffer Encoding.UTF8.GetBytes text MemoryStream ms new MemoryStream using GZipStream zip new GZipStream ms CompressionMode.Compress true zip.Write buffer 0 buffer.Length.. .Net methods public static string compress string text byte buffer Encoding.UTF8.GetBytes text MemoryStream ms new MemoryStream using GZipStream zip new GZipStream ms CompressionMode.Compress true zip.Write buffer 0 buffer.Length ms.Position 0 MemoryStream.. using GZipStream zip new GZipStream ms CompressionMode.Compress true zip.Write buffer 0 buffer.Length ms.Position 0 MemoryStream outStream new MemoryStream byte compressed new byte ms.Length ms.Read compressed 0 compressed.Length byte gzBuffer new byte..