MCPcopy
hub / github.com/encode/starlette / apply_compression

Method apply_compression

starlette/middleware/gzip.py:109–116  ·  view source on GitHub ↗

Apply compression on the response body. If more_body is False, any compression file should be closed. If it isn't, it won't be closed automatically until all background tasks complete.

(self, body: bytes, *, more_body: bool)

Source from the content-addressed store, hash-verified

107 await self.send(message)
108
109 def apply_compression(self, body: bytes, *, more_body: bool) -> bytes:
110 """Apply compression on the response body.
111
112 If more_body is False, any compression file should be closed. If it
113 isn't, it won't be closed automatically until all background tasks
114 complete.
115 """
116 return body
117
118
119class GZipResponder(IdentityResponder):

Callers 1

send_with_compressionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected