Skip to content

Commit c137caa

Browse files
committed
Create isal_zlib.pyi file
1 parent 026f150 commit c137caa

File tree

3 files changed

+96
-1
lines changed

3 files changed

+96
-1
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def build_isa_l():
128128
zip_safe=False,
129129
packages=find_packages('src'),
130130
package_dir={'': 'src'},
131-
package_data={'isal': ['*.pxd', '*.pyx',
131+
package_data={'isal': ['*.pxd', '*.pyx', '*.pyi', 'py.typed',
132132
# Include isa-l LICENSE and other relevant files
133133
# with the binary distribution.
134134
'isa-l/LICENSE', 'isa-l/README.md',

src/isal/isal_zlib.pyi

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Copyright (c) 2020 Leiden University Medical Center
2+
#
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy
4+
# of this software and associated documentation files (the "Software"), to deal
5+
# in the Software without restriction, including without limitation the rights
6+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
# copies of the Software, and to permit persons to whom the Software is
8+
# furnished to do so, subject to the following conditions:
9+
#
10+
# The above copyright notice and this permission notice shall be included in
11+
# all copies or substantial portions of the Software.
12+
#
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
# SOFTWARE.
20+
21+
ISAL_BEST_SPEED: int
22+
ISAL_BEST_COMPRESSION: int
23+
ISAL_DEFAULT_COMPRESSION: int
24+
Z_BEST_SPEED: int
25+
Z_BEST_COMPRESSION: int
26+
Z_DEFAULT_COMPRESSION: int
27+
28+
DEF_BUF_SIZE: int
29+
DEF_MEM_LEVEL: int
30+
MAX_WBITS: int
31+
ISAL_DEFAULT_HIST_BITS: int
32+
33+
DEFLATED: int
34+
35+
Z_DEFAULT_STRATEGY: int
36+
Z_RLE: int
37+
Z_HUFFMAN_ONLY: int
38+
Z_FILTERED: int
39+
Z_FIXED: int
40+
41+
ISAL_NO_FLUSH: int
42+
ISAL_SYNC_FLUSH: int
43+
ISAL_FULL_FLUSH: int
44+
45+
Z_NO_FLUSH: int
46+
Z_SYNC_FLUSH: int
47+
Z_FINISH: int
48+
49+
class IsalError(OSError): ...
50+
51+
error: IsalError
52+
53+
def adler32(data, value: int) -> int: ...
54+
def crc32(data, value: int) -> int: ...
55+
56+
def compress(data, level: int, wbits: int) -> bytes: ...
57+
def decompress(data, wbits: int, bufsize: int) -> bytes: ...
58+
59+
class Compress:
60+
def compress(self, data) -> bytes: ...
61+
def flush(self, mode: int) -> bytes: ...
62+
63+
class Decompress:
64+
unused_data: bytes
65+
unconsumed_tail: bytes
66+
eof: bool
67+
crc: int
68+
69+
def decompress(self, data, max_length: int) -> bytes: ...
70+
def flush(self, length: int) -> bytes: ...
71+
72+
def compressobj(level: int, method: int, wbits: int, memLevel: int,
73+
strategy: int, zdict) -> Compress: ...
74+
def decompressobj(wbits: int, zdict) -> Decompress: ...

src/isal/py.typed

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright (c) 2020 Leiden University Medical Center
2+
#
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy
4+
# of this software and associated documentation files (the "Software"), to deal
5+
# in the Software without restriction, including without limitation the rights
6+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
# copies of the Software, and to permit persons to whom the Software is
8+
# furnished to do so, subject to the following conditions:
9+
#
10+
# The above copyright notice and this permission notice shall be included in
11+
# all copies or substantial portions of the Software.
12+
#
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
# SOFTWARE.
20+
#
21+
# Marker file for PEP 561.

0 commit comments

Comments
 (0)