Update stub for zlib

This commit is contained in:
Yusuke Miyazaki
2016-03-05 13:38:24 +09:00
parent 4297e82bc8
commit 3193c317df
2 changed files with 47 additions and 27 deletions

View File

@@ -1,7 +1,5 @@
# Stubs for zlib (Python 2.7)
class error(Exception): ...
DEFLATED = ... # type: int
DEF_MEM_LEVEL = ... # type: int
MAX_WBITS = ... # type: int
@@ -17,20 +15,28 @@ Z_HUFFMAN_ONLY = ... # type: int
Z_NO_FLUSH = ... # type: int
Z_SYNC_FLUSH = ... # type: int
class error(Exception): ...
class Compress:
def compress(self, data: str) -> str: ...
def flush(self) -> str: ...
def copy(self) -> "Compress": ...
class Decompress:
unused_data = ... # type: str
unconsumed_tail = ... # type: str
def decompress(self, data: str, max_length: int = ...) -> str: ...
def flush(self) -> str: ...
def copy(self) -> "Decompress": ...
def adler32(data: str, value: int = ...) -> int: ...
def compress(data: str, level: int = ...) -> str: ...
def compressobj(level: int = ..., method: int = ..., wbits: int = ...,
memlevel: int = ..., strategy: int = ...) -> Compress: ...
def crc32(data: str, value: int = ...) -> int: ...
def decompress(data: str, wbits: int = ..., bufsize: int = ...) -> str: ...
class compressobj:
def __init__(self, level: int = ..., method: int = ..., wbits: int = ..., memlevel: int = ...,
strategy: int = ...) -> None: ...
def copy(self) -> "compressobj": ...
def compress(self, data: str) -> str: ...
def flush(self) -> None: ...
class decompressobj:
def __init__(self, wbits: int = ...) -> None: ...
def copy(self) -> "decompressobj": ...
def decompress(self, data: str, max_length: int = ...) -> str: ...
def flush(self) -> None: ...
def decompressobj(wbits: int = ...) -> Decompress: ...