I need access to the wbits argument to the underlying zlib.decompress() call in order to decompress gzip-formatted DMARC report XML attachments. I've tried to strip the gzip data in Jinja and add a standard zlib header, but I need to calculate an Adler32 checksum on the decompressed data in order to do that, which is what I am trying to get in the first place. With access to wbits I could just pass 47 to the function and zlib should handle the gzip magic for me. Without it, as far as I can tell I would have to implement zlib from scratch in Jinja. https://docs.python.org/3/library/zlib.html#zlib.decompress UPDATE: I've worked around this by passing the data back and forth to a webhook and setting Content-Encoding: gzip, but this is an ugly hack and it would be nice to have proper gzip support.