Added methods to parse and serialize VarInts.