Support gzip/deflate encodings

Fixes #3, fixes #4