You can use a BufferedInputStream. It is likely to be a good idea in any case. This will allow you to mark() the start and attempt to uncompress the data and if it fails, reset() the stream and read it normally. (more efficiently, all GZIP files start with the same two bytes) ;)
All GZIP streams start with bytes 1f 8b http://en.wikipedia.org/wiki/Gzip