posix: this looks a million times nicer than a bunch of shifts. Also faster, apparently.