`None` unless `data` is one whole stream
(data: bytes, wbits: int)
| 113 | |
| 114 | |
| 115 | def decompress(data: bytes, wbits: int) -> bytes | None: |
| 116 | """`None` unless `data` is one whole stream""" |
| 117 | stream = zlib.decompressobj(wbits) |
| 118 | try: |
| 119 | result = stream.decompress(data) |
| 120 | except zlib.error: |
| 121 | return None |
| 122 | return result if stream.eof and not stream.unused_data else None |
| 123 | |
| 124 | |
| 125 | def read_wheel(path: Path) -> list[Member]: |
no outgoing calls
no test coverage detected