Add stubs for zstd (#9484)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
Victor B
2023-02-01 06:41:19 +01:00
committed by GitHub
parent 0e7365a7ef
commit 1cc8080c7e
2 changed files with 19 additions and 0 deletions

4
stubs/zstd/METADATA.toml Normal file
View File

@@ -0,0 +1,4 @@
version = "1.5.*"
[tool.stubtest]
ignore_missing_stub = false

15
stubs/zstd/zstd.pyi Normal file
View File

@@ -0,0 +1,15 @@
from _typeshed import ReadableBuffer
class Error(Exception): ...
def ZSTD_compress(__data: ReadableBuffer, __level: int = ..., __threads: int = ...) -> bytes: ...
def ZSTD_external() -> int: ...
def ZSTD_uncompress(__data: ReadableBuffer) -> bytes: ...
def ZSTD_version() -> str: ...
def ZSTD_version_number() -> int: ...
def compress(__data: ReadableBuffer, __level: int = ..., __threads: int = ...) -> bytes: ...
def decompress(__data: ReadableBuffer) -> bytes: ...
def dumps(__data: ReadableBuffer, __level: int = ..., __threads: int = ...) -> bytes: ...
def loads(__data: ReadableBuffer) -> bytes: ...
def uncompress(__data: ReadableBuffer) -> bytes: ...
def version() -> str: ...