Change bitmap safe format

Change un/pack_bit_str() to pack_bit_str_hex(), which has much
better scalability and performance.