string hexstr = http.Body.ToString();
if (hexstr.Contains("1f8b"))
{
Stream str = http.Body.ToMemoryStream();
str.Position = str.Seek(0x1f8b, SeekOrigin.Begin);
using (var zipStream = new GZipStream(str, CompressionMode.Decompress))
using (var resultStream = new MemoryStream())
{
zipStream.CopyTo(resultStream);
return resultStream.ToArray();
}
}
How can I trim a stream and make its beginning point as 1F8B.