MCPcopy Create free account
hub / github.com/aio-libs/aiohttp / __init__

Method __init__

aiohttp/compression_utils.py:269–281  ·  view source on GitHub ↗
(
        self,
        encoding: str | None = None,
        suppress_deflate_header: bool = False,
        executor: Executor | None = None,
        max_sync_chunk_size: int | None = MAX_SYNC_CHUNK_SIZE,
    )

Source from the content-addressed store, hash-verified

267
268class 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

Callers

nothing calls this directly

Calls 4

encoding_to_modeFunction · 0.85
ZLibBackendWrapperClass · 0.85
__init__Method · 0.45
decompressobjMethod · 0.45

Tested by

no test coverage detected