Read a 'Length Coded Binary' number from the data buffer. Length coded numbers can be anywhere from 1 to 9 bytes depending on the value of the first byte.
(self)
| 143 | return result |
| 144 | |
| 145 | def read_length_encoded_integer(self): |
| 146 | """Read a 'Length Coded Binary' number from the data buffer. |
| 147 | |
| 148 | Length coded numbers can be anywhere from 1 to 9 bytes depending |
| 149 | on the value of the first byte. |
| 150 | """ |
| 151 | c = self.read_uint8() |
| 152 | if c == NULL_COLUMN: |
| 153 | return None |
| 154 | if c < UNSIGNED_CHAR_COLUMN: |
| 155 | return c |
| 156 | elif c == UNSIGNED_SHORT_COLUMN: |
| 157 | return self.read_uint16() |
| 158 | elif c == UNSIGNED_INT24_COLUMN: |
| 159 | return self.read_uint24() |
| 160 | elif c == UNSIGNED_INT64_COLUMN: |
| 161 | return self.read_uint64() |
| 162 | |
| 163 | def read_length_coded_string(self): |
| 164 | """Read a 'Length Coded String' from the data buffer. |
no test coverage detected