def _VarintEncoder():
 local_chr = chr
 def EncodeVarint(write, value):
  bits = (value & 127)
  value >>= 7
  while value:
   write(local_chr((128 | bits)))
   bits = (value & 127)
   value >>= 7
  return write(local_chr(bits))
 return EncodeVarint

def _VarintEncoder ( ) : local_chr = chr def EncodeVarint ( write , value ) : bits = ( value & 127 ) value >>= 7 while value : write ( local_chr ( ( 128 | bits ) ) ) bits = ( value & 127 ) value >>= 7 return write ( local_chr ( bits ) ) return EncodeVarint
return an encoder for a basic varint value .