Merge pull request #103 from ymyzk/update-zlib

Update stub for zlib
This commit is contained in:
Guido van Rossum
2016-03-05 21:02:42 -08:00
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: ...

View File

@@ -1,8 +1,4 @@
# Stubs for zlib (Python 3.4)
#
# NOTE: This stub was automatically generated by stubgen.
# TODO: Compress and Decompress classes are not published by the module.
# Stubs for zlib
DEFLATED = ... # type: int
DEF_BUF_SIZE = ... # type: int
@@ -21,12 +17,30 @@ Z_HUFFMAN_ONLY = ... # type: int
Z_NO_FLUSH = ... # type: int
Z_SYNC_FLUSH = ... # type: int
def adler32(data, value=...) -> int: ...
def compress(data, level: int = ...): ...
def compressobj(level=..., method=..., wbits=..., memlevel=...,
strategy=..., zdict=...): ...
def crc32(data, value=...) -> int: ...
def decompress(data, wbits=..., bufsize=...): ...
def decompressobj(wbits=..., zdict=...): ...
class error(Exception): ...
class Compress:
def compress(self, data: bytes) -> bytes: ...
def flush(self, mode: int = ...) -> bytes: ...
def copy(self) -> "Compress": ...
class Decompress:
unused_data = ... # type: bytes
unconsumed_tail = ... # type: bytes
eof = ... # type: bool
def decompress(self, data: bytes, max_length: int = ...) -> bytes: ...
def flush(self, length: int = ...) -> bytes: ...
def copy(self) -> "Decompress": ...
def adler32(data: bytes, value: int = ...) -> int: ...
def compress(data: bytes, level: int = ...) -> bytes: ...
def compressobj(level: int = ..., method: int = ..., wbits: int = ...,
memlevel: int = ..., strategy: int = ...,
zdict: bytes = ...) -> Compress: ...
def crc32(data: bytes, value: int = ...) -> int: ...
def decompress(data: bytes, wbits: int = ..., bufsize: int = ...) -> bytes: ...
def decompressobj(wbits: int = ..., zdict: bytes = ...) -> Decompress: ...