Known implementations: twisted.web.server._GzipEncoder

An object encoding data passed to IRequest.write, for example for compression purpose.

Present Since12.3
Method encode Encode the data given and return the result.
Method finish Callback called when the request is closing.
def encode(data): (source)

Encode the data given and return the result.

ParametersdataThe content to encode. (type: str)
ReturnsThe encoded data. (type: str)
def finish(): (source)

Callback called when the request is closing.

ReturnsIf necessary, the pending data accumulated from previous encode calls. (type: str)
API Documentation for Twisted, generated by pydoctor at 2017-09-23 19:45:03.