//--- Serialize ---
UnitySerializer srlzr = new UnitySerializer();
srlzr.Serialize(new Vector3(4, 8, 6));
byte[] byteArray = srlzr.ByteArray;
// send byte array somewhere..
//--- Deserialize ---
UnitySerializer dsrlzr = new UnitySerializer(byteArray);
Vector3 point3 = dsrlzr.DeserializeVector3();
It supports Vector3, Vector2 and Quaternions, as well as the common primitives and its easy enough to extend to extra types. Just be sure to deserialize the data in the same order it was serialized. Check out the Example() function at the bottom to see how it works.