While I was working on a program that could read in MIDI files and (roughly) replay them, I ran into something I had never seen before: Variable Length Quantities (VLQs). It's an integer format unlike any fixed-length type: smaller numbers are represented in less space than large numbers.