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)
| 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) |
no test coverage detected