Support decompression of gzip data in byte array

I submitted this earlier, but it went completely ignored.  Perhaps you didn't like how messy the old PR was, so I cleaned it up.