Function
encoding_to_mode
(
encoding: str | None = None,
suppress_deflate_header: bool = False,
)
Source from the content-addressed store, hash-verified
| 146 | |
| 147 | |
| 148 | def encoding_to_mode( |
| 149 | encoding: str | None = None, |
| 150 | suppress_deflate_header: bool = False, |
| 151 | ) -> int: |
| 152 | if encoding == "gzip": |
| 153 | return 16 + ZLibBackend.MAX_WBITS |
| 154 | |
| 155 | return -ZLibBackend.MAX_WBITS if suppress_deflate_header else ZLibBackend.MAX_WBITS |
| 156 | |
| 157 | |
| 158 | class DecompressionBaseHandler(ABC): |
Tested by
no test coverage detected