Refactored VarInt methods into a class with specific public methods to handle each type of VarInt.