def _VarintEncoder():
def EncodeVarint(write, value):<EOL><INDENT>bits = value & <NUM_LIT><EOL>value >>= <NUM_LIT:7><EOL>while value:<EOL><INDENT>write(six.int2byte(<NUM_LIT>|bits))<EOL>bits = value & <NUM_LIT><EOL>value >>= <NUM_LIT:7><EOL><DEDENT>return write(six.int2byte(bits))<EOL><DEDENT>return EncodeVarint<EOL>
Return an encoder for a basic varint value (does not include tag).