MCPcopy
hub / github.com/encode/httpx / decode

Method decode

httpx/_decoders.py:136–143  ·  view source on GitHub ↗
(self, data: bytes)

Source from the content-addressed store, hash-verified

134 self._decompress = self.decompressor.process # pragma: no cover
135
136 def decode(self, data: bytes) -> bytes:
137 if not data:
138 return b""
139 self.seen_data = True
140 try:
141 return self._decompress(data)
142 except brotli.error as exc:
143 raise DecodingError(str(exc)) from exc
144
145 def flush(self) -> bytes:
146 if not self.seen_data:

Callers

nothing calls this directly

Calls 1

DecodingErrorClass · 0.85

Tested by

no test coverage detected