use pack/unpack with big-endian format