快速对象序列化Python模块:rencode
jopen
11年前
快速(基本)对象序列化的Python模块类似于来自BitTorrent项目的bencode。对于复杂的异构数据结构有许多小的元素,R-编码占用比B-编码空间显著少:
>>> len(rencode.dumps({'a':0, 'b':[1,2], 'c':99})) 13 >>> len(bencode.bencode({'a':0, 'b':[1,2], 'c':99})) 26这个版本的rencode采用Cython进行一个完全重写,增加了性能。