MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / EncodeSignedLeb128

Function EncodeSignedLeb128

Bcore/src/main/cpp/base/leb128.h:284–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282}
283
284static inline uint8_t* EncodeSignedLeb128(uint8_t* dest, int32_t value) {
285 uint32_t extra_bits = static_cast<uint32_t>(value ^ (value >> 31)) >> 6;
286 uint8_t out = value & 0x7f;
287 while (extra_bits != 0u) {
288 *dest++ = out | 0x80;
289 value >>= 7;
290 out = value & 0x7f;
291 extra_bits >>= 7;
292 }
293 *dest++ = out;
294 return dest;
295}
296
297template<typename Vector>
298static inline void EncodeSignedLeb128(Vector* dest, int32_t value) {

Callers 1

PushBackSignedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected