It appears that Azure Functions doesn't support middleware the same way that Web API does, so I cannot implement gzip response compressions in code like suggested in my comments under the issue https://github.com/Azure/azure-functions-host/issues/7285.
At this point, I do not know any way to work around this issue and I am stuck with linux app services being unable to use gzip compression, so I have deployed a new function app on windows infrastructure.
I wish there was an easier way, but at this point Microsoft sees gzip compression as a feature of Windows which is not available in Linux.