|
1 | 1 | import sys
|
2 |
| -from array import array |
3 |
| -from typing import Any |
| 2 | +from _typeshed import ReadableBuffer |
4 | 3 | from typing_extensions import Literal
|
5 | 4 |
|
6 | 5 | DEFLATED: Literal[8]
|
@@ -29,29 +28,34 @@ Z_TREES: Literal[6]
|
29 | 28 | class error(Exception): ...
|
30 | 29 |
|
31 | 30 | class _Compress:
|
32 |
| - def compress(self, data: bytes) -> bytes: ... |
| 31 | + def compress(self, data: ReadableBuffer) -> bytes: ... |
33 | 32 | def flush(self, mode: int = ...) -> bytes: ...
|
34 | 33 | def copy(self) -> _Compress: ...
|
35 | 34 |
|
36 | 35 | class _Decompress:
|
37 | 36 | unused_data: bytes
|
38 | 37 | unconsumed_tail: bytes
|
39 | 38 | eof: bool
|
40 |
| - def decompress(self, data: bytes, max_length: int = ...) -> bytes: ... |
| 39 | + def decompress(self, data: ReadableBuffer, max_length: int = ...) -> bytes: ... |
41 | 40 | def flush(self, length: int = ...) -> bytes: ...
|
42 | 41 | def copy(self) -> _Decompress: ...
|
43 | 42 |
|
44 |
| -def adler32(__data: bytes, __value: int = ...) -> int: ... |
| 43 | +def adler32(__data: ReadableBuffer, __value: int = ...) -> int: ... |
45 | 44 |
|
46 | 45 | if sys.version_info >= (3, 11):
|
47 |
| - def compress(__data: bytes, level: int = ..., wbits: int = ...) -> bytes: ... |
| 46 | + def compress(__data: ReadableBuffer, level: int = ..., wbits: int = ...) -> bytes: ... |
48 | 47 |
|
49 | 48 | else:
|
50 |
| - def compress(__data: bytes, level: int = ...) -> bytes: ... |
| 49 | + def compress(__data: ReadableBuffer, level: int = ...) -> bytes: ... |
51 | 50 |
|
52 | 51 | def compressobj(
|
53 |
| - level: int = ..., method: int = ..., wbits: int = ..., memLevel: int = ..., strategy: int = ..., zdict: bytes | None = ... |
| 52 | + level: int = ..., |
| 53 | + method: int = ..., |
| 54 | + wbits: int = ..., |
| 55 | + memLevel: int = ..., |
| 56 | + strategy: int = ..., |
| 57 | + zdict: ReadableBuffer | None = ..., |
54 | 58 | ) -> _Compress: ...
|
55 |
| -def crc32(__data: array[Any] | bytes, __value: int = ...) -> int: ... |
56 |
| -def decompress(__data: bytes, wbits: int = ..., bufsize: int = ...) -> bytes: ... |
57 |
| -def decompressobj(wbits: int = ..., zdict: bytes = ...) -> _Decompress: ... |
| 59 | +def crc32(__data: ReadableBuffer, __value: int = ...) -> int: ... |
| 60 | +def decompress(__data: ReadableBuffer, wbits: int = ..., bufsize: int = ...) -> bytes: ... |
| 61 | +def decompressobj(wbits: int = ..., zdict: ReadableBuffer = ...) -> _Decompress: ... |
0 commit comments