zoukankan      html  css  js  c++  java
  • C#, Serialize and deserialize, Protoco Buffer from google

    0. The following content is from : https://developers.google.com/protocol-buffers/docs/overview

    1. What are protocol buffers

    Protocol buffers are a flexible, efficient, automated mechanism for serializing structured data – think XML, but smaller, faster, and simpler. You define how you want your data to be structured once, then you can use special generated source code to easily write and read your structured data to and from a variety of data streams and using a variety of languages. You can even update your data structure without breaking deployed programs that are compiled against the "old" format.

    2. Ways of serialize and retrieve structured data

        1) use .NET binary serialization with System.Runtime.Serialization.Formatters.Binary.BinaryFormatter and associated classes.

        2) invent an ad-hoc way to encode the data items into a single string -- such as encoding 4 ints as "xx:xxx:xx:xxx".

        3) serialize the data to XML

        4) 

    3.

  • 相关阅读:
    NOIP2016 愤怒的小鸟
    LCIS code force 10D
    UVA 1398
    uva1382 Distant Galaxy
    洛谷-3930(我在洛谷上也写了题解)
    HDU-1505 City Game
    导弹拦截n logn的算法(单调性)洛谷1020
    POJ 1182 食物链
    POJ
    1202. 交换字符串中的元素
  • 原文地址:https://www.cnblogs.com/sarah-zhang/p/12407601.html
Copyright © 2011-2022 走看看