partial support for gzip encoding + unit tests (ref issue #67)