@@ -4,11 +4,11 @@ from typing import Any, TypeAlias
44from google .protobuf .descriptor import Descriptor , FieldDescriptor
55from google .protobuf .message import Message
66
7- _Decoder : TypeAlias = Callable [[str , int , int , Message , dict [FieldDescriptor , Any ]], int ]
8- _NewDefault : TypeAlias = Callable [[Message ], Message ]
7+ _Decoder : TypeAlias = Callable [[memoryview , int , int , Message , dict [FieldDescriptor , Any ]], int ]
8+ _NewDefault : TypeAlias = Callable [[Message ], Any ]
99
1010def IsDefaultScalarValue (value : Any ) -> bool : ...
11- def ReadTag (buffer : bytes , pos : int ) -> tuple [bytes , int ]: ...
11+ def ReadTag (buffer : memoryview , pos : int ) -> tuple [bytes , int ]: ...
1212def DecodeTag (tag_bytes : bytes ) -> tuple [int , int ]: ...
1313def EnumDecoder (
1414 field_number : int ,
@@ -18,21 +18,110 @@ def EnumDecoder(
1818 new_default : _NewDefault ,
1919 clear_if_default : bool = False ,
2020) -> _Decoder : ...
21-
22- Int32Decoder : _Decoder
23- Int64Decoder : _Decoder
24- UInt32Decoder : _Decoder
25- UInt64Decoder : _Decoder
26- SInt32Decoder : _Decoder
27- SInt64Decoder : _Decoder
28- Fixed32Decoder : _Decoder
29- Fixed64Decoder : _Decoder
30- SFixed32Decoder : _Decoder
31- SFixed64Decoder : _Decoder
32- FloatDecoder : _Decoder
33- DoubleDecoder : _Decoder
34- BoolDecoder : _Decoder
35-
21+ def Int32Decoder (
22+ field_number : int ,
23+ is_repeated : bool ,
24+ is_packed : bool ,
25+ key : FieldDescriptor ,
26+ new_default : _NewDefault ,
27+ clear_if_default : bool = False ,
28+ ) -> _Decoder : ...
29+ def Int64Decoder (
30+ field_number : int ,
31+ is_repeated : bool ,
32+ is_packed : bool ,
33+ key : FieldDescriptor ,
34+ new_default : _NewDefault ,
35+ clear_if_default : bool = False ,
36+ ) -> _Decoder : ...
37+ def UInt32Decoder (
38+ field_number : int ,
39+ is_repeated : bool ,
40+ is_packed : bool ,
41+ key : FieldDescriptor ,
42+ new_default : _NewDefault ,
43+ clear_if_default : bool = False ,
44+ ) -> _Decoder : ...
45+ def UInt64Decoder (
46+ field_number : int ,
47+ is_repeated : bool ,
48+ is_packed : bool ,
49+ key : FieldDescriptor ,
50+ new_default : _NewDefault ,
51+ clear_if_default : bool = False ,
52+ ) -> _Decoder : ...
53+ def SInt32Decoder (
54+ field_number : int ,
55+ is_repeated : bool ,
56+ is_packed : bool ,
57+ key : FieldDescriptor ,
58+ new_default : _NewDefault ,
59+ clear_if_default : bool = False ,
60+ ) -> _Decoder : ...
61+ def SInt64Decoder (
62+ field_number : int ,
63+ is_repeated : bool ,
64+ is_packed : bool ,
65+ key : FieldDescriptor ,
66+ new_default : _NewDefault ,
67+ clear_if_default : bool = False ,
68+ ) -> _Decoder : ...
69+ def Fixed32Decoder (
70+ field_number : int ,
71+ is_repeated : bool ,
72+ is_packed : bool ,
73+ key : FieldDescriptor ,
74+ new_default : _NewDefault ,
75+ clear_if_default : bool = False ,
76+ ) -> _Decoder : ...
77+ def Fixed64Decoder (
78+ field_number : int ,
79+ is_repeated : bool ,
80+ is_packed : bool ,
81+ key : FieldDescriptor ,
82+ new_default : _NewDefault ,
83+ clear_if_default : bool = False ,
84+ ) -> _Decoder : ...
85+ def SFixed32Decoder (
86+ field_number : int ,
87+ is_repeated : bool ,
88+ is_packed : bool ,
89+ key : FieldDescriptor ,
90+ new_default : _NewDefault ,
91+ clear_if_default : bool = False ,
92+ ) -> _Decoder : ...
93+ def SFixed64Decoder (
94+ field_number : int ,
95+ is_repeated : bool ,
96+ is_packed : bool ,
97+ key : FieldDescriptor ,
98+ new_default : _NewDefault ,
99+ clear_if_default : bool = False ,
100+ ) -> _Decoder : ...
101+ def FloatDecoder (
102+ field_number : int ,
103+ is_repeated : bool ,
104+ is_packed : bool ,
105+ key : FieldDescriptor ,
106+ new_default : _NewDefault ,
107+ clear_if_default : bool = False ,
108+ ) -> _Decoder : ...
109+ def DoubleDecoder (
110+ field_number : int ,
111+ is_repeated : bool ,
112+ is_packed : bool ,
113+ key : FieldDescriptor ,
114+ new_default : _NewDefault ,
115+ clear_if_default : bool = False ,
116+ ) -> _Decoder : ...
117+ def BoolDecoder (
118+ field_number : int ,
119+ is_repeated : bool ,
120+ is_packed : bool ,
121+ key : FieldDescriptor ,
122+ new_default : _NewDefault ,
123+ clear_if_default : bool = False ,
124+ ) -> _Decoder : ...
36125def StringDecoder (
37126 field_number : int ,
38127 is_repeated : bool ,
0 commit comments