| 105 | } |
| 106 | |
| 107 | void varUInt(uint64_t n) { |
| 108 | if (n < 253) |
| 109 | pack<uint8_t>(n); |
| 110 | else if (n < 65536) { |
| 111 | pack<uint8_t>(253); |
| 112 | pack<uint16_t>(n); |
| 113 | } else if (n < 4294967296) { |
| 114 | pack<uint8_t>(254); |
| 115 | pack<uint32_t>(n); |
| 116 | } else { |
| 117 | pack<uint8_t>(255); |
| 118 | pack<uint64_t>(n); |
| 119 | } |
| 120 | } |
| 121 | void varInt(int64_t n) { varUInt(uint64_t(n) << 1 ^ n >> 63); } |
| 122 | std::string take() { return std::move(buf_); } |
| 123 |
nothing calls this directly
no outgoing calls
no test coverage detected