This past weekend I spent an inordinate amount of time writing a small set of code that will allow the fetching of bits (rather than bytes) from a FILE *. For now this only supports reading, not writing. It’s meant to be used in an upcoming piece of work that transcodes mpeg video streams, into image feature, or 3D-model streams. At any rate, it’s probably useful for other things as well. (Works for Macs and Linux, passed tests for both endian architectures).