I'm not sure exactly what's going on, but it seems the gzip compression inside libxml2 is not working with these libraries.
I observed this in the lxml unit tests, ones that use string or HTTP with compression support:
test.py lxml.tests.test_etree ETreeC14NTestCase.test_c14n_file_gzip
test.py lxml.tests.test_etree ETreeWriteTestCase.test_write_file_gzip
test.py lxml.tests.test_etree ETreeWriteTestCase.test_write_file_gzipfiletest_parse
test.py lxml.tests.test_http_io HttpIOTestCase.test_http_client_gzip
The other gzip tests do the compression work in the lxml code, rather than using libxml2's compression support.
I created a minimal reproduction case:
#!/usr/bin/env python
from lxml import etree
from io import StringIO
etree.parse(StringIO(u'<a><b/></a>')).write_c14n('test1.xml', compression=9)
On Python 2.7.12 x64 using lxml 3.6.0 (latest Python 2.7 wheel available on pypi), the created file is gzip-compressed: Success
On Python 3.5.2 x64 using lxml 3.7.2 or 3.7.1 (only Python 3.5 wheels available on pypi), the created file in uncompressed: Failure
I've also confirmed this behaviour in a local build of unmodified lxml trunk.
The build scripts for libxml2-win-binaries do not currently enable zlib support in the libxml2 or libxslt2 libraries. I was attempting to fix this in a branch (See TBBle/libxml2-win-binaries@43eff97, the rest of that branch is pending in #5). Building lxml against the AppVeyor builds of that branch didn't cause the tests to pass, so I'm not sure if something else is wrong still with that branch, or if the problem is elsewhere.
A notable difference is that if you remove the zlib downloading and linking from the setupinfo.py and buildlibxml.py in lxml, the build against latest-release libs in libxml2-win-binaries still works, but against my own branched libraries fail to link due to missing zlib symbols. So my branch changes have had some effect, but not resolved the issue.
So at this point, I'm trying to work out why even my builds (which clearly do reference zlib) do not seem to compress when passed the compression parameter. The next step might be to build some of the libxml2 tools in the same build-pass, and see if they work with compressed data.