compression - .NET GZipStream compress and decompress -


What is wrong with this code below I mean, after compression, my meaning always goes wrong, matching the data that is decompressed with the original value Does not eat.

Public Strength Test () {string sample = "This is Microsoft's pure compression test .net gzip compression method and Deccpression methods"; System.Text.ASCIIEncoding Encoding = New System. Text.ASCIIEncoding (); Byte [] Data = Encoding Getbytes (sample); Bull results = False; // Insert memorystream cmpStream; Cmpstream = new memorystream (); Gzipstream hg = new gzipstream (CMPstream, compression mod. Compress); Hgs. Write (data, 0, data. Lang); Byte [] cmpData = cmpStream.ToArray (); Memorystream decomstream; DecomStream = new memorystream (CMPData); Hgs = new gzipstream (decomostream, compression mode.decpress); Hg. Read (Data, 0, Data. Lang); String sampleOut = System.BitConverter.ToString (data); Results = string. Ecloss (sample, sample auto); Return result; }

I really appreciate it if you can tell where I'm making a mistake

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -