Debian Codegraph @

jedi/third_party/typeshed/stdlib/zlib.pyi

raw symbols SCIP
1 import sys
2 from _typeshed import ReadableBuffer
3 from typing import Any, Final, final, type_check_only
4 from typing_extensions import Self
5
6 DEFLATED: Final = 8
7 DEF_MEM_LEVEL: Final[int]
8 DEF_BUF_SIZE: Final = 16384
9 MAX_WBITS: Final[int]
10 ZLIB_VERSION: Final[str]
11 ZLIB_RUNTIME_VERSION: Final[str]
12 Z_NO_COMPRESSION: Final = 0
13 Z_PARTIAL_FLUSH: Final = 1
14 Z_BEST_COMPRESSION: Final = 9
15 Z_BEST_SPEED: Final = 1
16 Z_BLOCK: Final = 5
17 Z_DEFAULT_COMPRESSION: Final = -1
18 Z_DEFAULT_STRATEGY: Final = 0
19 Z_FILTERED: Final = 1
20 Z_FINISH: Final = 4
21 Z_FIXED: Final = 4
22 Z_FULL_FLUSH: Final = 3
23 Z_HUFFMAN_ONLY: Final = 2
24 Z_NO_FLUSH: Final = 0
25 Z_RLE: Final = 3
26 Z_SYNC_FLUSH: Final = 2
27 Z_TREES: Final = 6
28
29 if sys.version_info >= (3, 14):
30 # Available when zlib was built with zlib-ng
31 ZLIBNG_VERSION: Final[str]
32
33 class error(Exception): ...
34
35 # This class is not exposed at runtime. It calls itself zlib.Compress.
36 @final
37 @type_check_only
38 class _Compress:
39 def __copy__(self) -> Self: ...
40 def __deepcopy__(self, memo: Any, /) -> Self: ...
41 def compress(self, data: ReadableBuffer, /) -> bytes: ...
42 def flush(self, mode: int = 4, /) -> bytes: ...
43 def copy(self) -> _Compress: ...
44
45 # This class is not exposed at runtime. It calls itself zlib.Decompress.
46 @final
47 @type_check_only
48 class _Decompress:
49 @property
50 def unused_data(self) -> bytes: ...
51 @property
52 def unconsumed_tail(self) -> bytes: ...
53 @property
54 def eof(self) -> bool: ...
55 def __copy__(self) -> Self: ...
56 def __deepcopy__(self, memo: Any, /) -> Self: ...
57 def decompress(self, data: ReadableBuffer, /, max_length: int = 0) -> bytes: ...
58 def flush(self, length: int = 16384, /) -> bytes: ...
59 def copy(self) -> _Decompress: ...
60
61 def adler32(data: ReadableBuffer, value: int = 1, /) -> int: ...
62
63 if sys.version_info >= (3, 11):
64 def compress(data: ReadableBuffer, /, level: int = -1, wbits: int = 15) -> bytes: ...
65
66 else:
67 def compress(data: ReadableBuffer, /, level: int = -1) -> bytes: ...
68
69 def compressobj(
70 level: int = -1, method: int = 8, wbits: int = 15, memLevel: int = 8, strategy: int = 0, zdict: ReadableBuffer | None = None
71 ) -> _Compress: ...
72 def crc32(data: ReadableBuffer, value: int = 0, /) -> int: ...
73 def decompress(data: ReadableBuffer, /, wbits: int = 15, bufsize: int = 16384) -> bytes: ...
74 def decompressobj(wbits: int = 15, zdict: ReadableBuffer = b"") -> _Decompress: ...