In General, the question is not obvious at first glance.
What we have:
There is a stream inputStream.
We know that he probably Packed gzip'ohms. Maybe it isn't.
What you need:
You want to read this thread, if necessary after unpacking.
If you just wrap it in GzipStream, it will crash with the error "The magic number in GZip header is not correct".
You can't just subtract the stream into a byte  and then to play with that array, as there are strict limits on the speed.
Does anyone have any suggestions how to do it?