Implementation de la serialization, deserialization de la classe packet