Pickle alternatives

后端 未结 8 2150
南旧
南旧 2021-02-05 04:16

I am trying to serialize a large (~10**6 rows, each with ~20 values) list, to be used later by myself (so pickle\'s lack of safety isn\'t a concern).

Each row of the lis

8条回答
  •  迷失自我
    2021-02-05 04:20

    Protocol buffers are a flexible, efficient, automated mechanism for serializing structured data – think XML, but smaller, faster, and simpler.

    advantages over XML:

    • are simpler
    • are 3 to 10 times smaller
    • are 20 to 100 times faster
    • are less ambiguous
    • generate data access classes that are easier to use programmatically

    https://developers.google.com/protocol-buffers/docs/pythontutorial

提交回复
热议问题