97c1232eb4
(I goofed on the bitshifts myself long ago ;) and a bit redundant: code should be clear enough that it seldom needs comments at all.