from _typeshed import ReadableBuffer
from cramjam import Buffer, BufferInput, BufferOutput

def decompress(data: BufferInput, output_len: int | None = None) -> Buffer: ...
def compress(data: BufferInput, output_len: int | None = None) -> Buffer: ...
def decompress_raw(data: BufferInput, output_len: int | None = None) -> Buffer: ...
def compress_raw(data: BufferInput, output_len: int | None = None) -> Buffer: ...
def compress_into(input: BufferInput, output: BufferOutput) -> int: ...
def decompress_into(input: BufferInput, output: BufferOutput) -> int: ...
def compress_raw_into(input: BufferInput, output: BufferOutput) -> int: ...
def decompress_raw_into(input: BufferInput, output: BufferOutput) -> int: ...
def compress_raw_max_len(data: BufferInput) -> int: ...
def decompress_raw_len(data: BufferInput) -> int: ...

class Compressor:
    def __init__(self) -> None: ...
    def compress(self, input: ReadableBuffer) -> int: ...
    def flush(self) -> Buffer: ...
    def finish(self) -> Buffer: ...

class Decompressor:
    def __init__(self) -> None: ...
    def len(self) -> int: ...
    def decompress(self, input: BufferInput) -> int: ...
    def flush(self) -> Buffer: ...
    def finish(self) -> Buffer: ...
    def __len__(self) -> int: ...
    def __contains__(self, x: BufferInput) -> bool: ...
    def __repr__(self) -> str: ...
    def __bool__(self) -> bool: ...
