def encode_vlq(i):
<EOL>raw = (-i << <NUM_LIT:1>) + <NUM_LIT:1> if i < <NUM_LIT:0> else i << <NUM_LIT:1><EOL>if raw < VLQ_MULTI_CHAR:<EOL><INDENT>return INT_B64[raw]<EOL><DEDENT>result = []<EOL>while raw:<EOL><INDENT>result.append(raw & VLQ_BASE_MASK | VLQ_CONT)<EOL>raw = raw >> VLQ_SHIFT<EOL><DEDENT>result[-<NUM_LIT:1>] &= VLQ_BASE_MASK<EOL>return '<STR_LIT>'.join(INT_B64[i] for i in result)<EOL>
Encode integer `i` into a VLQ encoded string.