MCPcopy
hub / github.com/urllib3/urllib3 / deflate2_compress

Function deflate2_compress

test/test_response.py:47–49  ·  view source on GitHub ↗
(data: bytes)

Source from the content-addressed store, hash-verified

45
46
47def deflate2_compress(data: bytes) -> bytes:
48 compressor = zlib.compressobj(6, zlib.DEFLATED, -zlib.MAX_WBITS)
49 return compressor.compress(data) + compressor.flush()
50
51
52if brotli:

Callers

nothing calls this directly

Calls 1

flushMethod · 0.45

Tested by

no test coverage detected