Does c# interpret gzip data differently than vb6? I rewrote one of my vb6 programs in c# and i send a request, and receive data back. Then i split the data into headers and body. I then try to decompress the gzip body and it always fails with a "magic number is wrong" error. I tried my decompression on data generated from my vb6 project and it works fine, so it must have something to do with c# interprets it, or how i put it into the stream i decompress from. I found that if i put ‹ (not <) between the 2 box characters at the beggining of my gzip data, it fails with a crc error instead, probably because i added data. Here's is how i put the string of data i received into the stream for decompression.
Thanks for any ideas or helpCode:public static byte[] StrToByteArray(string str) { System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding(); return encoding.GetBytes(str); } byte[] strHTMLb = StrToByteArray(strParts[1]); MemoryStream memstream = new MemoryStream(strHTMLb);