{"id":254904,"date":"2015-04-09T18:47:03","date_gmt":"2015-04-09T14:47:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=254904"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=254904","title":{"rendered":"Binary serialization in Unity3d or dot.net"},"content":{"rendered":"<p> \t\t\t\u0414\u0435\u043d\u044c \u0434\u043e\u0431\u0440\u044b\u0439 \u0445\u0430\u0431\u0440.<br \/>  \u0421\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e-\u0442\u0430\u043a\u0438 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439. \u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0434\u0435\u0441\u0438\u0440\u0438\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<h5>\u0417\u0430\u0434\u0430\u0447\u0430<\/h5>\n<p>  \u0415\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043b\u0438\u0435\u043d\u0442-\u0441\u0435\u0440\u0432\u0435\u0440. \u041a\u043b\u0438\u0435\u043d\u0442 \u2014 Unity3d \u0441\u0435\u0440\u0432\u0435\u0440 PhotonServer. \u0415\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438 \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e\u0439. \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b. <\/p>\n<h5>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h5>\n<p>  <\/p>\n<h6>Protobuf<\/h6>\n<p>  \u0421\u0430\u043c\u043e\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u2014 \u044d\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b. \u0412 \u044d\u0442\u043e\u043c \u044f\u0432\u043d\u044b\u0439 \u0444\u0430\u0432\u043e\u0440\u0438\u0442 \u2014 ptotobuf (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b proto-net 668). \u041e\u043d \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0432\u0435\u0431-\u0441\u0431\u043e\u0440\u043a\u0443, \u043d\u043e \u044d\u0442\u043e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u0430\u044f \u0436\u0435\u0440\u0442\u0432\u0430. \u0420\u0430\u0437\u043c\u0435\u0442\u0438\u043b \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u044e. \u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0438 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435. \u0428\u0438\u043a\u0430\u0440\u043d\u043e. \u041d\u043e! <br \/>  <a name=\"habracut\"><\/a><br \/>  \u0412 \u043e\u0434\u0438\u043d \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 Protobuf \u0432\u044b\u043f\u043b\u044e\u043d\u0443\u043b \u0435\u043a\u0437\u0435\u043f\u0448\u0435\u043d, \u043c\u043e\u043b, \u0442\u0430\u043a\u043e\u0439 \u043a\u043b\u0430\u0441\u0441 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d. \u041a\u0430\u043a \u044d\u0442\u043e? <br \/>  <a href=\"https:\/\/code.google.com\/p\/protobuf-net\/issues\/detail?id=455&amp;start=200\">\u0411\u0430\u0433<\/a> \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u043a\u043e\u0434\u0430. <\/p>\n<p>  \u041d\u0430\u0447\u0430\u043b \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438 \u0440\u0435\u0448\u0430\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443. \u0415\u0441\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441\u043a\u0430\u0440\u043c\u043b\u0438\u0432\u0430\u0442\u044c Protobuf \u0442\u0438\u043f\u044b. \u0427\u0442\u043e \u0443\u0436\u0435 \u043d\u0435 \u0445\u043e\u0440\u043e\u0448\u043e. \u041c\u043e\u0436\u043d\u043e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u043e\u0448\u0438\u0431\u043e\u043a \u0438\u043b\u0438 \u0437\u0430\u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u043e\u0442 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u0442\u0438\u043f. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, Protobuf \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e\u043c\u0435\u0440\u043d\u044b\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u044b. <\/p>\n<p>  \u041a\u0430\u043a \u043d\u0438 \u043f\u0440\u0438\u0441\u043a\u043e\u0440\u0431\u043d\u043e, \u043d\u043e Protobuf \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443. \u041a \u0441\u043b\u043e\u0432\u0443, \u043e\u0434\u043d\u0430\u0436\u0434\u044b \u043f\u044b\u0442\u0430\u043b\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Protobuf \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 php \u0438 Unity. \u0421\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b php \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f Protobuf \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0430\u0433\u0430\u043d\u0443\u0442\u043e\u0439. \u0412 \u0438\u0442\u043e\u0433\u0435 \u0432 php \u0438 Unity \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b json. \u042d\u0442\u043e \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u0435\u0436\u0434\u0443 php \u0438 Unity \u0445\u043e\u0434\u0438\u043b\u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e-\u0442\u0430\u043a\u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h6>Message pack<\/h6>\n<p>  \u0421\u0435\u0449\u0443\u0441\u0442\u0432\u0443\u0435\u0442 \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440. \u0415\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044f\u0437\u044b\u043a\u043e\u0432. \u0417\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e. \u0420\u0435\u0448\u0438\u043b \u043e\u043f\u0440\u043e\u0431\u044b\u0432\u0430\u0442\u044c. \u041f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0439 \u0442\u0438\u043f \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e. \u0420\u0430\u0437\u043c\u0435\u0440 18 \u0431\u0430\u0439\u0442 \u043f\u0440\u043e\u0442\u0438\u0432 \u043c\u043e\u0435\u0433\u043e 41 \u0431\u0430\u0439\u0442\u0430, \u043f\u0440\u043e\u0442\u0438\u0432 19 \u0431\u0430\u0439\u0442\u043e\u0432 protobuf \u0438 \u043f\u0440\u043e\u0442\u0438\u0432 44 \u0431\u0430\u0439\u0442\u043e\u0432 json. \u041e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u0412 \u0447\u0435\u043c \u0436\u0435 \u0445\u0438\u0442\u0440\u043e\u0441\u0442\u044c? \u041d\u0430 \u043e\u0444\u0438\u0446\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a \u043e\u043d \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0432\u0441\u0435 \u043f\u0430\u043a\u0443\u0435\u0442. \u0412\u043e\u0442 <a href=\"https:\/\/github.com\/msgpack\/msgpack\/blob\/master\/spec.md\">\u0441\u0441\u044b\u043b\u043a\u0430<\/a>.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">[Serializable, ProtoContract()]     public class TTT     {         [TDataMember, ProtoMember(1)]         public string s = &quot;compact&quot;;         [TDataMember, ProtoMember(2)]         public bool f = true;         [TDataMember, ProtoMember(3)]         public string s2 = &quot;schema&quot;;         [TDataMember, ProtoMember(4)]         public short i = 0;      } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041d\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442, \u0434\u0430\u043b\u0435\u0435 \u043d\u0435 \u043e\u0441\u0438\u043b\u0438\u043b message pack, binary formatter \u0438 protobuf. <\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">BinaryFormatter<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">SerializationException: Type TestS+TestC1 in assembly Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null is not marked as serializable. System.Runtime.Serialization.FormatterServices.GetSerializableMembers (System.Type type, StreamingContext context) (at \/Users\/builduser\/buildslave\/mono-runtime-and-classlibs\/build\/mcs\/class\/corlib\/System.Runtime.Serialization\/FormatterServices.cs:101) System.Runtime.Serialization.Formatters.Binary.CodeGenerator.GenerateMetadataTypeInternal (System.Type type, StreamingContext context) (at \/Users\/builduser\/buildslave\/mono-runtime-and-classlibs\/build\/mcs\/class\/corlib\/System.Runtime.Serialization.Formatters.Binary\/CodeGenerator.cs:78) System.Runtime.Serialization.Formatters.Binary.CodeGenerator.GenerateMetadataType (System.Type type, StreamingContext context) (at \/Users\/builduser\/buildslave\/mono-runtime-and-classlibs\/build\/mcs\/class\/corlib\/System.Runtime.Serialization.Formatters.Binary\/CodeGenerator.cs:64) System.Runtime.Serialization.Formatters.Binary.ObjectWriter.CreateMemberTypeMetadata (System.Type type) (at \/Users\/builduser\/buildslave\/mono-runtime-and-classlibs\/build\/mcs\/class\/corlib\/System.Runtime.Serialization.Formatters.Binary\/ObjectWriter.cs:442) System.Runtime.Serialization.Formatters.Binary.ObjectWriter.GetObjectData (System.Object obj, System.Runtime.Serialization.Formatters.Binary.TypeMetadata& metadata, System.Object& data) (at \/Users\/builduser\/buildslave\/mono-runtime-and-classlibs\/build\/mcs\/class\/corlib\/System.Runtime.Serialization.Formatters.Binary\/ObjectWriter.cs:430) System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteObject (System.IO.BinaryWriter writer, Int64 id, System.Object obj) (at \/Users\/builduser\/buildslave\/mono-runtime-and-classlibs\/build\/mcs\/class\/corlib\/System.Runtime.Serialization.Formatters.Binary\/ObjectWriter.cs:306) System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteObjectInstance (System.IO.BinaryWriter writer, System.Object obj, Boolean isValueObject) (at \/Users\/builduser\/buildslave\/mono-runtime-and-classlibs\/build\/mcs\/class\/corlib\/System.Runtime.Serialization.Formatters.Binary\/ObjectWriter.cs:293) System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteQueuedObjects (System.IO.BinaryWriter writer) (at \/Users\/builduser\/buildslave\/mono-runtime-and-classlibs\/build\/mcs\/class\/corlib\/System.Runtime.Serialization.Formatters.Binary\/ObjectWriter.cs:271) System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteObjectGraph (System.IO.BinaryWriter writer, System.Object obj, System.Runtime.Remoting.Messaging.Header[] headers) (at \/Users\/builduser\/buildslave\/mono-runtime-and-classlibs\/build\/mcs\/class\/corlib\/System.Runtime.Serialization.Formatters.Binary\/ObjectWriter.cs:256) System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize (System.IO.Stream serializationStream, System.Object graph, System.Runtime.Remoting.Messaging.Header[] headers) (at \/Users\/builduser\/buildslave\/mono-runtime-and-classlibs\/build\/mcs\/class\/corlib\/System.Runtime.Serialization.Formatters.Binary\/BinaryFormatter.cs:232) System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize (System.IO.Stream serializationStream, System.Object graph) (at \/Users\/builduser\/buildslave\/mono-runtime-and-classlibs\/build\/mcs\/class\/corlib\/System.Runtime.Serialization.Formatters.Binary\/BinaryFormatter.cs:211) <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Message pack<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">PlatformNotSupportedException: On-the-fly enum serializer generation is not supported in Unity iOS. Use pre-generated serializer instead. MsgPack.Serialization.ReflectionSerializers.ReflectionSerializerHelper.CreateReflectionEnuMessagePackSerializer[State] (MsgPack.Serialization.SerializationContext context) MsgPack.Serialization.MessagePackSerializer.CreateReflectionInternal[State] (MsgPack.Serialization.SerializationContext context) MsgPack.Serialization.MessagePackSerializer.CreateReflectionInternal (MsgPack.Serialization.SerializationContext context, System.Type targetType) MsgPack.Serialization.SerializationContext.GetSerializer (System.Type targetType, System.Object providerParameter) MsgPack.Serialization.ReflectionSerializers.ReflectionSerializerHelper.GetMetadata (MsgPack.Serialization.SerializationContext context, System.Type targetType, System.Func`2[]& getters, System.Action`2[]& setters, System.Reflection.MemberInfo[]& memberInfos, MsgPack.Serialization.DataMemberContract[]& contracts, MsgPack.Serialization.IMessagePackSerializer[]& serializers) MsgPack.Serialization.ReflectionSerializers.ReflectionObjectMessagePackSerializer`1[TestS+TestC]..ctor (MsgPack.Serialization.SerializationContext context) MsgPack.Serialization.MessagePackSerializer.CreateReflectionInternal[TestC] (MsgPack.Serialization.SerializationContext context) MsgPack.Serialization.SerializationContext.GetSerializer[TestC] (System.Object providerParameter) MsgPack.Serialization.SerializationContext.GetSerializer[TestC] ()  \/\/\/ [,] string ArgumentException: 'System.String[,]' is not compatible for 'System.String[]'. Parameter name: objectTree MsgPack.Serialization.MessagePackSerializer`1[System.String[]].MsgPack.Serialization.IMessagePackSerializer.PackTo (MsgPack.Packer packer, System.Object objectTree) MsgPack.Serialization.ReflectionSerializers.ReflectionObjectMessagePackSerializer`1[TestS+TestC].PackMemberValue (MsgPack.Packer packer, .TestC objectTree, Int32 index) MsgPack.Serialization.ReflectionSerializers.ReflectionObjectMessagePackSerializer`1[TestS+TestC].PackToCore (MsgPack.Packer packer, .TestC objectTree) MsgPack.Serialization.MessagePackSerializer`1[TestS+TestC].PackTo (MsgPack.Packer packer, .TestC objectTree) MsgPack.Serialization.MessagePackSerializer`1[TestS+TestC].Pack (System.IO.Stream stream, .TestC objectTree) \/\/\/ etc SerializationException: Non generic collection may contain only MessagePackObject type. MsgPack.Serialization.DefaultSerializers.NonGenericEnumerableSerializerBase`1[T].PackToCore (MsgPack.Packer packer, .T objectTree) MsgPack.Serialization.MessagePackSerializer`1[T].MsgPack.Serialization.IMessagePackSerializer.PackTo (MsgPack.Packer packer, System.Object objectTree) MsgPack.Serialization.ReflectionSerializers.ReflectionCollectionSerializer`1[System.Collections.ArrayList].PackToCore (MsgPack.Packer packer, System.Collections.ArrayList objectTree) MsgPack.Serialization.MessagePackSerializer`1[System.Collections.ArrayList].MsgPack.Serialization.IMessagePackSerializer.PackTo (MsgPack.Packer packer, System.Object objectTree) MsgPack.Serialization.ReflectionSerializers.ReflectionObjectMessagePackSerializer`1[TestS+TestC].PackMemberValue (MsgPack.Packer packer, .TestC objectTree, Int32 index) MsgPack.Serialization.ReflectionSerializers.ReflectionObjectMessagePackSerializer`1[TestS+TestC].PackToCore (MsgPack.Packer packer, .TestC objectTree) MsgPack.Serialization.MessagePackSerializer`1[TestS+TestC].PackTo (MsgPack.Packer packer, .TestC objectTree) MsgPack.Serialization.MessagePackSerializer`1[TestS+TestC].Pack (System.IO.Stream stream, .TestC objectTree) <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Protobuf-net<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">NotSupportedException: Multi-dimension arrays are supported ProtoBuf.Meta.MetaType.ResolveListTypes (ProtoBuf.Meta.TypeModel model, System.Type type, System.Type& itemType, System.Type& defaultType) ProtoBuf.Meta.MetaType.ApplyDefaultBehaviour (Boolean isEnum, ProtoBuf.ProtoMemberAttribute normalizedAttribute) ProtoBuf.Meta.MetaType.ApplyDefaultBehaviour () ProtoBuf.Meta.RuntimeTypeModel.FindOrAddAuto (System.Type type, Boolean demand, Boolean addWithContractOnly, Boolean addEvenIfAutoDisabled) ProtoBuf.Meta.RuntimeTypeModel.GetKey (System.Type type, Boolean demand, Boolean getBaseKey) <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h6>Json<\/h6>\n<p>  \u0418\u0442\u0430\u043a, Protobuf \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442. \u0427\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c? Json? \u041f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u0438 \u043d\u0435\u0442. \u0422\u0443\u0442 \u0432\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0434\u0436\u0435\u0439\u0441\u043e\u043d \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044f \u0442\u0438\u043f\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b. \u041d\u0435 \u0431\u0435\u0434\u0430, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u0433\u0443\u0433\u043b\u043e\u043c \u043d\u0430\u0448\u0435\u043b, \u043a\u0430\u043a \u00ab\u043d\u0430\u0443\u0447\u0438\u0442\u044c\u00bb \u0435\u0433\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e. \u0412 \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0442\u0438\u043f\u0435 \u043f\u043e\u043b\u044f \u0438 \u0435\u0433\u043e \u0434\u0430\u043d\u043d\u044b\u0435 (\u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0441\u0431\u043e\u0440\u043a\u0438, \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e; \u043f\u043e\u0447\u0435\u043c\u0443 \u2014 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0434\u0430\u043b\u0435\u0435). \u041d\u043e \u043f\u0440\u0438 \u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e \u043f\u043e\u043b\u0435 \u043f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u043d\u0443\u043b. \u0421\u043d\u043e\u0432\u0430 \u0433\u0443\u0433\u043b\u044e. \u0412\u0435\u0434\u044c \u0435\u0441\u043b\u0438 \u043d\u0430\u0443\u0447\u0438\u043b \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c, \u0437\u043d\u0430\u0447\u0438\u0442 \u043c\u043e\u0436\u043d\u043e \u0438 \u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u0441\u0442\u044b\u043b\u044c, \u0447\u0442\u043e \u0438 \u0441 Protobuf. \u0422\u0430\u043a\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0441\u0431\u043e\u0440\u043a\u0443 JSON .NET For Unity, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0435\u0441\u0442\u044c \u0432 \u0430\u0441\u0441\u0435\u0442\u043c\u0430\u0440\u043a\u0435\u0442\u0435. <\/p>\n<p>  \u0418\u0442\u043e\u0433: Json \u0445\u043e\u0440\u043e\u0448 \u0434\u043b\u044f \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440. \u041d\u043e \u043a\u043e\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u044f \u0442\u0438\u043f\u0430 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0438\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0441 \u043d\u0438\u043c \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. <\/p>\n<h6>XML<\/h6>\n<p>  \u0412 \u043b\u044e\u0431\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 xml \u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u0438\u0439. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0438\u043b \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c. \u0425\u043e\u0442\u044c \u0438 \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 xml. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<h6>BinaryFormatter<\/h6>\n<p>  \u0420\u0435\u0448\u0438\u043b \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u043a \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c. \u0420\u0430\u0437\u043c\u0435\u0442\u0438\u043b \u043a\u043e\u0434, \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u0435\u043c. Success! \u0411\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u0431\u044a\u0435\u043c \u0444\u0430\u0439\u043b\u0430, \u043f\u0440\u0430\u0432\u0434\u0430, \u043d\u0435 \u0435\u0441\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u043e. \u041d\u0435 \u0431\u0435\u0434\u0430, \u043f\u0440\u043e\u0439\u0434\u0435\u043c\u0441\u044f \u0435\u0449\u0435 \u0438 \u043a\u043e\u043c\u043f\u0440\u0435\u0441\u0441\u0438\u0435\u0439. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b LZMA. \u0412\u044b\u0438\u0433\u0440\u0430\u043b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432 \u0440\u0430\u0437\u043c\u0435\u0440\u0435, \u043d\u043e \u043f\u0440\u043e\u0438\u0433\u0440\u0430\u043b \u043f\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u0430\u044f \u0436\u0435\u0440\u0442\u0432\u0430. \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0431\u043e\u0440\u043a\u0438. \u0411\u0430\u0440\u0430\u0431\u0430\u043d\u043d\u0430\u044f \u0434\u0440\u043e\u0431\u044c. \u0412\u0435\u0431 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u0431\u0435\u0434\u0430\u2026<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0443\u0441\u0442\u0440\u043e\u0438\u043c \u043e\u0431\u043c\u0435\u043d \u043c\u0435\u0436\u0434\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c. \u0418\u2026 \u041e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 FAIL. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0441\u0431\u043e\u0440\u043a\u0438 \u0443 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0440\u0430\u0437\u043d\u044b\u0435, \u0445\u043e\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u044b \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435. \u0412 \u044e\u043d\u0438\u0442\u0438 \u0441\u0432\u043e\u044f \u0441\u0431\u043e\u0440\u043a\u0430 \u043d\u0430 \u0444\u043e\u0442\u043e\u043d\u0435 \u0441\u0432\u043e\u044f. \u041c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0441\u0442\u044b\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431. \u0417\u0430\u0431\u0438\u043d\u0434\u0438\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0438\u0445 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c, \u043d\u043e \u0441\u0431\u043e\u0440\u043a\u0430 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0444\u0430\u0439\u043b. \u0417\u0430\u0447\u0435\u043c \u043e\u043d\u0430 \u0442\u0430\u043c \u043d\u0443\u0436\u043d\u0430?<\/p>\n<p>  \u0420\u0435\u0448\u0438\u043b \u0447\u0442\u043e \u043a \u044d\u0442\u043e\u043c\u0443 \u0441\u043f\u043e\u0441\u043e\u0431\u0443 \u0432\u0435\u0440\u043d\u0443\u0441\u044c, \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b \u0435\u0449\u0435 \u043f\u0430\u0440\u043e\u0447\u043a\u0443 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432. \u041e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445 \u0428\u0430\u0440\u043f \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440. \u0421\u043c\u043e\u0433 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044f \u0442\u0438\u043f\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043d\u043e \u0442\u043e\u0436\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0441\u0431\u043e\u0440\u043a\u0443 \u0438 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0432\u0435\u0431\u0435. \u0422\u043e\u0433\u0434\u0430 \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0443.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0422\u0435\u0441\u0442 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">            TTT c = new TTT();             TSerizalization serizalization = new TSerizalization();             bytes = serizalization.Serizalize(c, true);             System.IO.File.WriteAllBytes(&quot;d:\\\\s.dat&quot;, bytes);             Debug.LogError(&quot;T complete &quot; + bytes.Length );              json = JsonConvert.SerializeObject(c);             System.IO.File.WriteAllText(&quot;d:\\\\s.json&quot;, json);             Debug.LogError(&quot;J complete &quot; + json.Length);              System.Runtime.Serialization.Formatters.Binary.BinaryFormatter formater = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter();             formater.AssemblyFormat = System.Runtime.Serialization.Formatters.FormatterAssemblyStyle.Full;             System.IO.MemoryStream mstream = new System.IO.MemoryStream();             formater.Serialize(mstream, c);             Debug.LogError(&quot;B complete &quot; +  mstream.ToArray().Length);              System.IO.File.WriteAllBytes(&quot;d:\\\\s2.dat&quot;, mstream.ToArray());              mstream = new System.IO.MemoryStream();              var serializer = MsgPack.Serialization.SerializationContext.Default.GetSerializer&lt;TTT&gt;();             serializer.Pack(mstream, c);             System.IO.File.WriteAllBytes(&quot;d:\\\\s3.dat&quot;, mstream.ToArray());             Debug.LogError(&quot;M complete &quot; +  mstream.ToArray().Length);              mstream = new System.IO.MemoryStream();             ProtoBuf.Serializer.Serialize&lt;TTT&gt;(mstream, c);                          System.IO.File.WriteAllBytes(&quot;d:\\\\s4.dat&quot;, mstream.ToArray());             Debug.LogError(&quot;P complete &quot; + mstream.ToArray().Length); <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h4>\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0443<\/h4>\n<p>  \u0422\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0439 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0443\u043c\u0435\u0442\u044c:  <\/p>\n<ul>\n<li> \u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442;<\/li>\n<li> \u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440;<\/li>\n<li> \u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 (\u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u0431\u043e\u0440\u043a\u0435 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u043d\u0430 \u0432 \u0444\u0430\u0439\u043b\u0435);<\/li>\n<li> \u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b;<\/li>\n<li> \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432\u044b;<\/li>\n<li> \u0420\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u0432\u0435\u0431 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u044e\u043d\u0438\u0442\u0438;<\/li>\n<li> \u0420\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0444\u043e\u0442\u043e\u043d\u043e\u043c.<\/li>\n<\/ul>\n<p>  \u0418\u0437 \u0442\u0435\u0445 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432, \u0447\u0442\u043e \u044f \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b. \u042d\u0442\u0438\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c \u0431\u043e\u043b\u0435\u0435 \u043c\u0435\u043d\u0435\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0442\u043e\u043b\u044c\u043a\u043e Json \u0438 protobuf \u0440\u0430\u043d\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. <\/p>\n<h4>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440<\/h4>\n<p>  \u041d\u0430\u0447\u0430\u043b \u0433\u0443\u0433\u043b\u0438\u0442\u044c. \u041d\u043e \u0431\u0435\u0437\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043d\u043e. \u0427\u0442\u043e \u0436\u0435 \u0434\u0435\u043b\u0430\u0442\u044c?<br \/>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u2014 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. \u0411\u043e\u043b\u044c\u0448\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u043c\u0438. <br \/>  \u0422\u043e\u0433\u0434\u0430 \u044f \u0440\u0435\u0448\u0438\u043b, \u043f\u043e\u0434 \u0432\u044b\u0448\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440. \u041f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u0438 \u043d\u0435\u0442. \u042d\u0442\u043e \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0435\u0439, \u043d\u0435\u0436\u0435\u043b\u0438 \u0432 \u043f\u0443\u0441\u0442\u0443\u044e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u0442 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440.<\/p>\n<p>  \u0421 \u0447\u0435\u0433\u043e \u043b\u0443\u0447\u0448\u0435 \u043d\u0430\u0447\u0430\u0442\u044c?<\/p>\n<p>  \u041a\u0430\u043a \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0438 \u043a\u0430\u043a \u0438\u0445 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c. \u0412 \u044d\u0442\u043e\u043c \u043f\u043b\u0430\u043d\u0435 \u043c\u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0441\u044f \u043f\u043e\u0434\u0445\u043e\u0434 protobuf-net 668. \u0410 \u0438\u043c\u0435\u043d\u043d\u043e \u2014 \u043c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0435 \u043f\u043e\u043b\u044f \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430. \u0422\u0430\u043a\u0436\u0435 \u043c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043c\u0435\u0442\u043e\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0437\u0432\u0430\u043d\u044b \u0434\u043e \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043f\u043e\u0441\u043b\u0435 \u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<h6>\u041a\u0430\u0440\u0442\u0430<\/h6>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u0430\u0440\u0442\u0443. \u0410 \u0438\u043c\u0435\u043d\u043d\u043e \u2014 \u043a\u043b\u044e\u0447 \u0438 \u0442\u0438\u043f. \u0427\u0442\u043e\u0431\u044b \u043f\u043e \u044d\u0442\u043e\u0439 \u043a\u0430\u0440\u0442\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u0442\u043e\u043c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442. \u0414\u043b\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 &lt; 0 \u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e &gt; 0. \u0420\u0430\u0437\u043c\u0435\u0440 \u043a\u043b\u044e\u0447\u0430 int16.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Map<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public class TMap  {         public Dictionary&lt;Type, short&gt; StandartTypes { get; protected set; }         public Dictionary&lt;Type, short&gt; DataBase { get; protected set; }         public Dictionary&lt;short, Type&gt; DataBaseTags { get; protected set; } ... } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0432\u044b\u043d\u0435\u0441 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0442\u0435\u0433\u0438 \u0447\u0442\u043e \u0431\u044b \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c.<\/p>\n<h6>TData \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/h6>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u043e\u043b\u044f \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430. \u0417\u0430\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0441\u0432\u043e\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u0438\u043c \u0442\u0435\u0433\u0438.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public class TData : TContainerBase     {         public object value;         public List&lt;TData&gt; childrens = new List&lt;TData&gt;(); ... } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432\u044b, \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043c\u0435\u0440\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\"> public  class TContainerBase     {         public short Tag { get; protected set; }         public int ArrayRank { get; protected set; }         public List&lt;int&gt; ArrayDimension { get; protected set; } ... <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u042f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0435 \u0434\u0435\u043b\u0438\u043b \u043d\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0442\u0438\u043f\u0430 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f \u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0442\u0438\u043f\u0430 \u043e\u0431\u044a\u0435\u043a\u0442. \u0412\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0432\u0438\u0434\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430. \u0427\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432, \u0435\u0441\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442 \u0437\u043d\u0430\u0447\u0438\u0442 \u0440\u0430\u043d\u0433 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u0432 \u043d\u0443\u043b\u044f\u0445.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u0435\u043d \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0441\u0430\u043c \u043e\u0431\u044a\u0435\u043a\u0442.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public class TContainer : TContainerBase     {         public int Size { get; protected set; }         public List&lt;object&gt; List { get; protected set; } ... <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0414\u0430\u043b\u0435\u0435. \u0421\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0438\u0445 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c.<\/p>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u0430\u0440\u0442\u0443 \u0442\u0438\u043f\u043e\u0432 \u0438 \u043a\u0430\u0440\u0442\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u0435\u043d \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0441\u0435 \u044d\u0442\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442. \u0421\u043e\u0437\u0434\u0430\u044e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0438 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u044f. \u042d\u0442\u043e \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439, \u0435\u0441\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0444\u043e\u0440\u043c\u0430\u0442. \u0422\u043e\u0442 \u0436\u0435 json \u0438\u043b\u0438 xml.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0427\u0442\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u044c<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public abstract class TReaderBase      {         public abstract T Read&lt;T&gt;(byte[] bytes, Assembly assembly);     } public abstract class TWriterBase      {         public abstract byte[] Write(TMap map, TData data);     } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u043e\u0442\u043e\u043c \u0443 \u043d\u0438\u0445 \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043f\u043e\u0442\u043e\u043a \u0438 \u0447\u0438\u0442\u0430\u0442\u044c \u0438\u0437 \u043f\u043e\u0442\u043e\u043a\u0430. \u041d\u043e \u043f\u043e\u043a\u0430 \u044d\u0442\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e. \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u044d\u0442\u043e \u0441\u043a\u043b\u0435\u0438\u043c \u0432 \u043e\u0434\u0438\u043d \u043a\u043b\u0430\u0441\u0441.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">T Serialization<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\"> public class TSerizalization     {         protected TMap map;          protected TWriterBase writer;         protected TReaderBase reader;                  public TSerizalization()         {             writer = new TBinaryWriter();             reader = new TBinaryReader();         }          public virtual byte[] Serialize(object target, bool callBeforeSerializationMethods = false);          public virtual T Deserialize&lt;T&gt;(byte[] bytes, Assembly assembly, bool callAfterDeserializationMethods = false);          protected virtual TData Read(object obj) } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h4>\u0422\u0435\u0441\u0442<\/h4>\n<p>  \u0413\u043e\u0442\u043e\u0432\u043e. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0442\u0435\u0441\u0442\u0430\u043c. \u041e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0422\u0435\u0441\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">public interface IClass { } [System.Serializable ] public class TestC : IClass { [To2dnd.TDataMember] public int a = 10; [To2dnd.TDataMember] public int b = 12; [To2dnd.TDataMember] public string s= &quot;Hello World&quot;;  [To2dnd.TDataMember] public State state = State.Close;  [To2dnd.TDataMember] public DateTime dt = new DateTime();  [To2dnd.TDataMember] public Type type = typeof(IClass);  [To2dnd.TDataMember] public string[,] arr = new string[,] { {&quot;1111&quot;, &quot;2222&quot;, &quot;3333&quot;, &quot;4444&quot; }, {&quot;aaaa&quot;, &quot;bbbb&quot;, &quot;cccc&quot;, &quot;dddd&quot; }, {&quot;321&quot;, &quot;32&quot;, &quot;2qfs&quot;, &quot;12f&quot; } };   [To2dnd.TDataMember] public object classD = new TestC2();  [To2dnd.TDataMember] public TestC1[] array1 = new TestC1[] { new TestC1(), new TestC2(), new TestC2() };  [To2dnd.TDataMember] public ArrayList arr2 = new ArrayList( new string[]{ &quot;list1&quot;, &quot;list2&quot; });   [To2dnd.TDataMember] public List&lt;string&gt; list = new List&lt;string&gt;() { &quot;list Item 1&quot;, &quot;List Item 2&quot; };  [To2dnd.TDataMember] public Dictionary&lt;string, int&gt; dic = new Dictionary&lt;string, int&gt;() { {&quot;one&quot;, 1}, {&quot;two&quot;, 2}, {&quot;three&quot;, 3}, {&quot;four&quot;, 4} };  [To2dnd.TDataMember] public Hashtable ht = new Hashtable() { {&quot;H one&quot;, 1}, {&quot;H two&quot;, 2}, {&quot;H three&quot;, 3}, {&quot;H four&quot;, 4} };  [To2dnd.TDataMember] public SortedList&lt;string, int&gt; sl = new SortedList&lt;string, int&gt;() { {&quot;S one&quot;, 1}, {&quot;S two&quot;, 2}, {&quot;S three&quot;, 3}, {&quot;S four&quot;, 4} };  [To2dnd.TDataMember] public Dictionary&lt;string, List&lt;string&gt;&gt; dic3 = new Dictionary&lt;string,List&lt;string&gt;&gt;() { {&quot;&gt;&gt; 1&quot;, new List&lt;string&gt;(){&quot;a1&quot;, &quot;a2&quot;, &quot;a3&quot;} }, {&quot;&gt;&gt; 2&quot;, new List&lt;string&gt;(){&quot;b1&quot;, &quot;b2&quot;, &quot;b3&quot;} }, {&quot;&gt;&gt; 3&quot;, new List&lt;string&gt;(){&quot;c1&quot;, &quot;c2&quot;, &quot;c3&quot;} } }; [To2dnd.TDataMember] public List&lt;List&lt;string&gt;&gt; l = new List&lt;List&lt;string&gt;&gt;() { new List&lt;string&gt;(){&quot;a1&quot;, &quot;a2&quot;, &quot;a3&quot;}, new List&lt;string&gt;(){&quot;b1&quot;, &quot;b2&quot;, &quot;b3&quot;}, };    [ProtoMember(16)] public Dictionary&lt;string, Dictionary&lt;string, string&gt;&gt; dic4 = new Dictionary&lt;string, Dictionary&lt;string, string&gt;&gt;() { {&quot;&gt;&gt; 1&quot;, new Dictionary&lt;string, string&gt;() { { &quot;a1&quot;, &quot;a2&quot;}, { &quot;a2&quot;, &quot;a3&quot;} } }, {&quot;&gt;&gt; 2&quot;, new Dictionary&lt;string, string&gt;() { { &quot;a1&quot;, &quot;a2&quot;}, { &quot;a2&quot;, &quot;a3&quot;} } } };  [ProtoMember(17)] public Dictionary&lt;string, Dictionary&lt;string, string&gt;&gt; Dic4 {get; protected set;}   [ProtoMember(18)] public Dictionary&lt;string, object&gt; dic333 = new Dictionary&lt;string, object&gt;() { {&quot;:@&quot;, new List&lt;string&gt;(){&quot;1&quot;, &quot;2&quot;, &quot;3&quot;}}, {&quot;:@2&quot;, new TestC2()}, {&quot;:@222&quot;, &quot;sff&quot;} };    public TestC() { Dic4 = new Dictionary&lt;string,Dictionary&lt;string,string&gt;&gt;() { {&quot;&gt;&gt; 1&quot;, new Dictionary&lt;string, string&gt;() { { &quot;a1&quot;, &quot;a2&quot;}, { &quot;a2&quot;, &quot;a3&quot;} } }, {&quot;&gt;&gt; 2&quot;, new Dictionary&lt;string, string&gt;() { { &quot;a1&quot;, &quot;a2&quot;}, { &quot;a2&quot;, &quot;a3&quot;} } } }; }  } [Serializable] public class TestC1 : IClass { [To2dnd.TDataMember] public float value1 = 10; [To2dnd.TDataMember] public float value2 = 12; }   [Serializable ] public class TestC2 : TestC1 { [To2dnd.TDataMember] public float a1 = 10; [To2dnd.TDataMember] public float b2 = 12; [To2dnd.TDataMember] public string str = &quot;Class 1&quot;;  [To2dnd.TDataMember] public State state = State.Close;  public TestC2() { }  [TAfterDeserialization] public void After() { }  [TBeforeSerialization] public void Before() { } }  public class TestC33 { [To2dnd.TDataMember] public float b2 = 12;  [To2dnd.TDataMember] public TestC2 tt = new TestC2();  [ To2dnd.TDataMember] public TestC1[] array1 = new TestC1[] { new TestC1(), new TestC2(), new TestC2() };  [To2dnd.TDataMember] public object classD = new TestC2();  [To2dnd.TDataMember] public Type type = typeof(IClass); } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412\u0438\u0434\u0435\u043e \u0442\u0435\u0441\u0442\u0430:<\/p>\n<p>  <iframe loading=\"lazy\" width=\"560\" height=\"349\" src=\"\/\/www.youtube.com\/embed\/QhyGAYzRG5g?wmode=opaque\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<h4>\u0418\u0442\u043e\u0433<\/h4>\n<p>  \u041f\u043e \u043e\u0431\u044a\u0435\u043c\u0443 \u0444\u0430\u0439\u043b\u0430, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u0435\u0442 Protobuf \u0438 messagepack. \u0412\u0435\u0434\u044c \u044f \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e \u043a\u0430\u0440\u0442\u0443 \u0442\u0438\u043f\u043e\u0432 \u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0445\u0438\u0442\u0440\u044b\u0435 \u043c\u0430\u0445\u0438\u043d\u0430\u0446\u0438\u0438 \u0441 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435\u043c \u0431\u0438\u0442\u043e\u0432 \u0438\u043b\u0438 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u0441\u0442\u0440\u043e\u043a \u00abbyte[] bytes = Encoding.UTF7.GetBytes((string)data.value)\u00bb. \u042d\u0442\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u043e\u0442\u043e\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u044e \u0432 \u0432\u0438\u0434\u0435 \u0432\u0430\u0440\u0438\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438. \u041f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u043e\u0431\u043c\u0435\u043d \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u0444\u043e\u0442\u043e\u043d\u043e\u043c \u0438 \u044e\u043d\u0438\u0442\u0438. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u0438 \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c. \u0412\u0435\u0434\u044c \u044f \u0441\u043e\u0437\u0434\u0430\u044e \u0442\u0438\u043f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0431\u043e\u0440\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 Deserialize.<\/p>\n<p>  \u0413\u043e\u0442\u043e\u0432\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435, \u043d\u0435 \u043f\u043e\u0434\u043e\u0448\u043b\u0438 \u043f\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0438\u0437\u043e\u0431\u0440\u0435\u0441\u0442\u0438 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434. \u041a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043b \u0437\u0430\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u043e\u0435 \u043d\u0430 \u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u044f. \u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u0443\u043b\u0443\u0447\u0448\u0430\u0442\u044c.<\/p>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0435 \u0442\u0438\u043f\u044b, \u0442\u043e \u0432\u0430\u043c \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u043b\u044e\u0431\u043e\u0439 \u0438\u0437 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043e\u0432 \u044f \u0432\u0441\u0435 \u0436\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0435\u043b \u0431\u044b Protobuf. \u041d\u043e \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u043e\u0439\u0434\u0443\u0442 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430. <\/p>\n<h4>\u0421\u0441\u044b\u043b\u043a\u0438<\/h4>\n<p>  <a href=\"https:\/\/code.google.com\/p\/protobuf-net\">Protobuf<\/a><br \/>  <a href=\"https:\/\/www.assetstore.unity3d.com\/en\/#!\/content\/11347\">Unity3d Json<\/a><br \/>  <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/system.runtime.serialization.serializationbinder.aspx\">MSDN binary formatter<\/a><br \/>  <a href=\"http:\/\/msgpack.org\/\">Message pack<\/a><br \/>  <a href=\"http:\/\/theburningmonk.com\/2011\/12\/performance-test-binary-serializers-part-ii\/\">\u0411\u0435\u0447\u043c\u0430\u0440\u043a\u0438<\/a> \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/255399\/\"> http:\/\/habrahabr.ru\/post\/255399\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p> \t\t\t\u0414\u0435\u043d\u044c \u0434\u043e\u0431\u0440\u044b\u0439 \u0445\u0430\u0431\u0440.<br \/>  \u0421\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e-\u0442\u0430\u043a\u0438 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439. \u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0434\u0435\u0441\u0438\u0440\u0438\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<h5>\u0417\u0430\u0434\u0430\u0447\u0430<\/h5>\n<p>  \u0415\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043b\u0438\u0435\u043d\u0442-\u0441\u0435\u0440\u0432\u0435\u0440. \u041a\u043b\u0438\u0435\u043d\u0442 \u2014 Unity3d \u0441\u0435\u0440\u0432\u0435\u0440 PhotonServer. \u0415\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438 \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e\u0439. \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b. <\/p>\n<h5>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h5>\n<p>  <\/p>\n<h6>Protobuf<\/h6>\n<p>  \u0421\u0430\u043c\u043e\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u2014 \u044d\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b. \u0412 \u044d\u0442\u043e\u043c \u044f\u0432\u043d\u044b\u0439 \u0444\u0430\u0432\u043e\u0440\u0438\u0442 \u2014 ptotobuf (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b proto-net 668). \u041e\u043d \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0432\u0435\u0431-\u0441\u0431\u043e\u0440\u043a\u0443, \u043d\u043e \u044d\u0442\u043e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u0430\u044f \u0436\u0435\u0440\u0442\u0432\u0430. \u0420\u0430\u0437\u043c\u0435\u0442\u0438\u043b \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u044e. \u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0438 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435. \u0428\u0438\u043a\u0430\u0440\u043d\u043e. \u041d\u043e!   <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-254904","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/254904","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=254904"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/254904\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=254904"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=254904"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=254904"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}