def VarintEncode(value):
  result = ""
  if value < 0:
    raise ValueError("Varint can not encode a negative number.")

  bits = value & 0x7f
  value >>= 7

  while value:
    result += HIGH_CHR_MAP[bits]
    bits = value & 0x7f
    value >>= 7

  result += CHR_MAP[bits]

  return result
Returns annotations as dictionary.
dataset/ETHPy150Open google/grr/grr/lib/rdfvalues/structs.py/VarintEncode--crossover with--dataset/ETHPy150Open SmokinCaterpillar/pypet/pypet/annotations.py/Annotations.f_to_dict