add another batch of encoding submodules (#13088)

This commit is contained in:
Stephen Morton
2024-11-25 07:31:06 -08:00
committed by GitHub
parent 7eea986ef6
commit 927302347f
21 changed files with 405 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
import codecs
from _typeshed import ReadableBuffer
class Codec(codecs.Codec):
def encode(self, input: str, errors: str = "strict") -> tuple[bytes, int]: ...
def decode(self, input: bytes, errors: str = "strict") -> tuple[str, int]: ...
class IncrementalEncoder(codecs.IncrementalEncoder):
def encode(self, input: str, final: bool = False) -> bytes: ...
class IncrementalDecoder(codecs.IncrementalDecoder):
def decode(self, input: ReadableBuffer, final: bool = False) -> str: ...
class StreamWriter(Codec, codecs.StreamWriter): ...
class StreamReader(Codec, codecs.StreamReader): ...
def getregentry() -> codecs.CodecInfo: ...
decoding_map: dict[int, int | None]
decoding_table: str
encoding_map: dict[int, int]