This algorithm will take a 10/12/14 bit word and distribute it among 2 8-bit words. But in a lossless, efficient way. Why might someone want this? Well, it lets you stream uniquely sized words over 8-bit serial. That's why I need it anyway. Here's an example:
Suppose you have an 8-bit serial port and you want to stream 12-bit audio at 8kHz. Well, serial is typically maxing out around 115200 bits/s. You can't just use 2 bytes per datapoint, because you'll generate too much content. In order to solve that problem, you can use the algorithm outlined here to smartly condense (and later, rehydrate) the binary data across multiple 8-bit words.