(mode: str)
| 354 | |
| 355 | |
| 356 | def _get_decoder(mode: str) -> ContentDecoder: |
| 357 | if "," in mode: |
| 358 | return MultiDecoder(mode) |
| 359 | |
| 360 | # According to RFC 9110 section 8.4.1.3, recipients should |
| 361 | # consider x-gzip equivalent to gzip |
| 362 | if mode in ("gzip", "x-gzip"): |
| 363 | return GzipDecoder() |
| 364 | |
| 365 | if brotli is not None and mode == "br": |
| 366 | return BrotliDecoder() |
| 367 | |
| 368 | if HAS_ZSTD and mode == "zstd": |
| 369 | return ZstdDecoder() |
| 370 | |
| 371 | return DeflateDecoder() |
| 372 | |
| 373 | |
| 374 | class BytesQueueBuffer: |
no test coverage detected