| 252 | } |
| 253 | |
| 254 | std::tuple<int64_t, std::string> SubByteReader::readSU(unsigned nrBits) |
| 255 | { |
| 256 | auto [value, coding] = readBits(nrBits); |
| 257 | int signMask = 1 << (nrBits - 1); |
| 258 | if (value & signMask) |
| 259 | { |
| 260 | auto subValue = int64_t(value) - 2 * signMask; |
| 261 | return {subValue, coding}; |
| 262 | } |
| 263 | return {int64_t(value), coding}; |
| 264 | } |
| 265 | |
| 266 | /* Is there more data? There is no more data if the next bit is the terminating |
| 267 | * bit and all following bits are 0. */ |
no outgoing calls
no test coverage detected