Simple packet serialization