Use with statement for GzipFile and werkzeug to calculate response length