(
self,
encoding: str | None = None,
suppress_deflate_header: bool = False,
executor: Executor | None = None,
max_sync_chunk_size: int | None = MAX_SYNC_CHUNK_SIZE,
)
| 267 | |
| 268 | class ZLibDecompressor(DecompressionBaseHandler): |
| 269 | def __init__( |
| 270 | self, |
| 271 | encoding: str | None = None, |
| 272 | suppress_deflate_header: bool = False, |
| 273 | executor: Executor | None = None, |
| 274 | max_sync_chunk_size: int | None = MAX_SYNC_CHUNK_SIZE, |
| 275 | ): |
| 276 | super().__init__(executor=executor, max_sync_chunk_size=max_sync_chunk_size) |
| 277 | self._mode = encoding_to_mode(encoding, suppress_deflate_header) |
| 278 | self._zlib_backend: Final = ZLibBackendWrapper(ZLibBackend._zlib_backend) |
| 279 | self._decompressor = self._zlib_backend.decompressobj(wbits=self._mode) |
| 280 | self._last_empty = False |
| 281 | self._pending_unused_data: bytes | None = None |
| 282 | |
| 283 | def decompress_sync( |
| 284 | self, data: Buffer, max_length: int = ZLIB_MAX_LENGTH_UNLIMITED |
nothing calls this directly
no test coverage detected