Improve reverseByte method to use fewer masks.