mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-09 18:09:17 +08:00
[zstd] Improve typing for zstd_dict parameter (#15113)
This commit is contained in:
+7
-2
@@ -46,7 +46,10 @@ class ZstdCompressor:
|
||||
FLUSH_BLOCK: Final = 1
|
||||
FLUSH_FRAME: Final = 2
|
||||
def __new__(
|
||||
cls, level: int | None = None, options: Mapping[int, int] | None = None, zstd_dict: ZstdDict | None = None
|
||||
cls,
|
||||
level: int | None = None,
|
||||
options: Mapping[int, int] | None = None,
|
||||
zstd_dict: ZstdDict | tuple[ZstdDict, int] | None = None,
|
||||
) -> Self: ...
|
||||
def compress(
|
||||
self, /, data: ReadableBuffer, mode: _ZstdCompressorContinue | _ZstdCompressorFlushBlock | _ZstdCompressorFlushFrame = 0
|
||||
@@ -58,7 +61,9 @@ class ZstdCompressor:
|
||||
|
||||
@final
|
||||
class ZstdDecompressor:
|
||||
def __new__(cls, zstd_dict: ZstdDict | None = None, options: Mapping[int, int] | None = None) -> Self: ...
|
||||
def __new__(
|
||||
cls, zstd_dict: ZstdDict | tuple[ZstdDict, int] | None = None, options: Mapping[int, int] | None = None
|
||||
) -> Self: ...
|
||||
def decompress(self, /, data: ReadableBuffer, max_length: int = -1) -> bytes: ...
|
||||
@property
|
||||
def eof(self) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user