首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Python > 二进制对象符号

二进制对象符号

  • 资源大小:10.50 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: 二进制 对象 符号

资 源 简 介

Binary Object Notation, bon, is similar to JavaScript Object Notation, json, excepts it produces binary output. bon produces almost minimal but yet powerful and intuitive representation. It can be used as a protocol format, too. Compared to Python object serialization modules marshal and pickle, bon creates ~30% smaller then marshal and ~50% then pickle smaller output. Python Example: ``` from bon import dumps, loads a = dumps({ 0: [None, True, False, -(2 ** 8), 2 ** 16 - 1, 2 ** 32 - 1, -0.12345, "a", "abcde"], 1: [(u"xeexff", "qwerty", {})], 2:None, 3:False, 4:True, 5:-0.12345678901234567890 }) print "serialized in", len(a), "bytes:", repr(a) b = loads(a) print b ```

文 件 列 表

bon
LICENSE
bon.geany
python
share
VIP VIP
  • IATWAY 1天前 成为了本站会员

  • 大智若愚 1天前 成为了本站会员

  • Mason 1天前 成为了本站会员

  • 1天前 成为了本站会员

  • Half_Punch 2天前 成为了本站会员

  • liqing71718 2天前 成为了本站会员

  • 伟国 2天前 成为了本站会员

  • songy 2天前 成为了本站会员

  • 纯色幽默 2天前 成为了本站会员

  • odd? 2天前 成为了本站会员

0.210607s