I'm parsing the Content-Length from a return header and grabbing that much data, which appears to be all of it, from the packets i receive. I then write it to a file like this:
The problem is that it also says the magic number is wrong when i try to decompress the gzip information. I tested my decompression on actual gzip data and it works fine so i know it's something with either my parsing or writing to the file. If anyone has an idea of what i'm doing wrong that would be great. Thanks for any helpCode:byte[] strHTMLb = StrToByteArray(strParts[1]); FileStream fs = File.Create(Environment.CurrentDirectory + @"\\gzipData.gz"); BinaryWriter bw = new BinaryWriter(fs); bw.Write(strHTMLb); bw.Close(); fs.Close();


Reply With Quote
