Initial implementation of BIT_PACK.

Not yet integrated, but passes a simple test.