Extracts varint so it can be used elsewhere outside of a ruby wrapper