1import sys
2from typing import IO, Optional, Union
3
4def b64encode(s: bytes, altchars: Optional[bytes] = ...) -> bytes: ...
5def b64decode(s: Union[str, bytes], altchars: Optional[bytes] = ..., validate: bool = ...) -> bytes: ...
6def standard_b64encode(s: bytes) -> bytes: ...
7def standard_b64decode(s: Union[str, bytes]) -> bytes: ...
8def urlsafe_b64encode(s: bytes) -> bytes: ...
9def urlsafe_b64decode(s: Union[str, bytes]) -> bytes: ...
10def b32encode(s: bytes) -> bytes: ...
11def b32decode(s: Union[str, bytes], casefold: bool = ..., map01: Optional[bytes] = ...) -> bytes: ...
12def b16encode(s: bytes) -> bytes: ...
13def b16decode(s: Union[str, bytes], casefold: bool = ...) -> bytes: ...
14
15if sys.version_info >= (3, 10):
16    def b32hexencode(s: bytes) -> bytes: ...
17    def b32hexdecode(s: Union[str, bytes], casefold: bool = ...) -> bytes: ...
18
19def a85encode(b: bytes, *, foldspaces: bool = ..., wrapcol: int = ..., pad: bool = ..., adobe: bool = ...) -> bytes: ...
20def a85decode(
21    b: Union[str, bytes], *, foldspaces: bool = ..., adobe: bool = ..., ignorechars: Union[str, bytes] = ...
22) -> bytes: ...
23def b85encode(b: bytes, pad: bool = ...) -> bytes: ...
24def b85decode(b: Union[str, bytes]) -> bytes: ...
25def decode(input: IO[bytes], output: IO[bytes]) -> None: ...
26def encode(input: IO[bytes], output: IO[bytes]) -> None: ...
27def encodebytes(s: bytes) -> bytes: ...
28def decodebytes(s: bytes) -> bytes: ...
29
30if sys.version_info < (3, 9):
31    def encodestring(s: bytes) -> bytes: ...
32    def decodestring(s: bytes) -> bytes: ...
33