Its ok if the data have fixed length/layout.
Otherwise a similar trick can be done if you have a compressor with stream support, which can be operated in a manner that:
Compress(String1 + String2) == Compress(String1) + X
Where + is concatenation and String1/2 are the serialized states.
Then if you want to send String2, you just send X (which is small if String1 and String2 similar enough).
And on the receiving side just run: Decompress(Compress(String1) + X)
After stripping String1 from the beginning you get String2.