# Copyright 2026 Helmut Grohne <helmut@subdivi.de>
# SPDX-License-Identifier: LGPL-2.0-or-later


import typing


class ZstdError(Exception): ...


class ZstdCompressor:
    def __init__(
        self,
        level: int = 3,
        dict_data: None = None,
        compression_params: None = None,
        write_checksum: bool | None = None,
        write_content_size: bool | None = None,
        write_dict_id: bool | None = None,
        threads: int = 0,
    ): ...


def open(
    filename: str | typing.BinaryIO,
    mode: typing.Literal[
        "a", "ab", "at", "r", "rb", "rt", "w", "wb", "wt", "x", "xb", "xt"
    ] = "rb",
    cctx: ZstdCompressor | None = None,
) -> typing.BinaryIO: ...
