Code I wrote while trying to understand VARINTs

Maybe useful/helpful to someone else?