#include uint32_t getvlq(uint8_t **); uint32_t getvlq(uint8_t **src) { uint8_t c, *p = *src; uint32_t value = *p++; if (value & 0x80) { value &= 0x7f; do value = (value << 7) + ((c = *p++) & 0x7f); while (c & 0x80); } *src = p; return value; }