MCPcopy
hub / github.com/urllib3/urllib3 / _flush_decoder

Method _flush_decoder

src/urllib3/response.py:656–663  ·  view source on GitHub ↗

Flushes the decoder. Should only be called if the decoder is actually being used.

(self)

Source from the content-addressed store, hash-verified

654 return data
655
656 def _flush_decoder(self) -> bytes:
657 """
658 Flushes the decoder. Should only be called if the decoder is actually
659 being used.
660 """
661 if self._decoder:
662 return self._decoder.decompress(b"") + self._decoder.flush()
663 return b""
664
665 # Compatibility methods for `io` module
666 def readinto(self, b: bytearray | memoryview[int]) -> int:

Callers 2

_decodeMethod · 0.95
read_chunkedMethod · 0.80

Calls 2

decompressMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected