Emit a signed variable length integer. Signed varints are encoded using a varint with zigzag encoding, meaning that we use the low bit of the value to indicate the sign of the value. This allows for more efficient encoding of negative values by limiting the number of active bits
| 95 | /// value to indicate the sign of the value. This allows for more efficient |
| 96 | /// encoding of negative values by limiting the number of active bits |
| 97 | void writeSignedVarInt(uint64_t value) { |
| 98 | writeVarInt((value << 1) ^ (uint64_t)((int64_t)value >> 63)); |
| 99 | } |
| 100 | |
| 101 | template <typename T> |
| 102 | std::enable_if_t<std::is_integral<T>::value, void> writeLE(T value) { |
no outgoing calls
no test coverage detected