lzma: Takes ReadableBuffer, not bytes (#8996)

This commit is contained in:
Jelle Zijlstra
2022-10-27 07:02:57 -07:00
committed by GitHub
parent 86ada9e41a
commit 739711e947

View File

@@ -83,7 +83,7 @@ PRESET_EXTREME: int # v big number
@final
class LZMADecompressor:
def __init__(self, format: int | None = ..., memlimit: int | None = ..., filters: _FilterChain | None = ...) -> None: ...
def decompress(self, data: bytes, max_length: int = ...) -> bytes: ...
def decompress(self, data: ReadableBuffer, max_length: int = ...) -> bytes: ...
@property
def check(self) -> int: ...
@property
@@ -99,7 +99,7 @@ class LZMACompressor:
def __init__(
self, format: int | None = ..., check: int = ..., preset: int | None = ..., filters: _FilterChain | None = ...
) -> None: ...
def compress(self, __data: bytes) -> bytes: ...
def compress(self, __data: ReadableBuffer) -> bytes: ...
def flush(self) -> bytes: ...
class LZMAError(Exception): ...
@@ -189,7 +189,9 @@ def open(
newline: str | None = ...,
) -> LZMAFile | TextIO: ...
def compress(
data: bytes, format: int = ..., check: int = ..., preset: int | None = ..., filters: _FilterChain | None = ...
data: ReadableBuffer, format: int = ..., check: int = ..., preset: int | None = ..., filters: _FilterChain | None = ...
) -> bytes: ...
def decompress(
data: ReadableBuffer, format: int = ..., memlimit: int | None = ..., filters: _FilterChain | None = ...
) -> bytes: ...
def decompress(data: bytes, format: int = ..., memlimit: int | None = ..., filters: _FilterChain | None = ...) -> bytes: ...
def is_check_supported(__check_id: int) -> bool: ...