MCPcopy Index your code
hub / github.com/PyMySQL/PyMySQL / read_length_coded_string

Method read_length_coded_string

pymysql/protocol.py:163–173  ·  view source on GitHub ↗

Read a 'Length Coded String' from the data buffer. A 'Length Coded String' consists first of a length coded (unsigned, positive) integer represented in 1-9 bytes followed by that many bytes of binary data. (For example "cat" would be "3cat".)

(self)

Source from the content-addressed store, hash-verified

161 return self.read_uint64()
162
163 def read_length_coded_string(self):
164 """Read a 'Length Coded String' from the data buffer.
165
166 A 'Length Coded String' consists first of a length coded
167 (unsigned, positive) integer represented in 1-9 bytes followed by
168 that many bytes of binary data. (For example "cat" would be "3cat".)
169 """
170 length = self.read_length_encoded_integer()
171 if length is None:
172 return None
173 return self.read(length)
174
175 def read_struct(self, fmt):
176 s = struct.Struct(fmt)

Callers 2

_read_row_from_packetMethod · 0.80

Calls 2

readMethod · 0.95

Tested by

no test coverage detected