def load_uvarint_b(buffer):
    """
    Variable int deserialization, synchronous from buffer.
    :param buffer:
    :return:
    """
    result = 0
    idx = 0
    byte = 128
    while byte & 128:
        byte = buffer[idx]
        result += (byte & 127) << 7 * idx
        idx += 1
    return result
