Serialize and deserialize mangling numbers.