correctly pack/unpack into 32-bit number for marking etc.