当前位置: 首页 > 软件库 > 程序开发 > 网络工具包 >

Pycrate

移动网络数据结构编码解码库
授权协议 LGPL
开发语言 Python
所属分类 程序开发、 网络工具包
软件类型 开源软件
地区 不详
投 递 者 苍意智
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Pycrate是一个法语单词,用于鉴定糟糕的葡萄酒。 而这个软件库与坏酒无关,它只是一个Python库,可以轻松地操作各种数字格式。 它是libmich的辉煌继承者。

Pycrate 提供了用于运行时对各种数据结构进行编码和解码,包括CSN.1和ASN.1。 此外,它还具有3G和LTE移动核心网络。

示例用法:

$ ./tools/pycrate_showmedia.py --help
usage: pycrate_showmedia.py [-h] [-bl BL] [-wt] input

print the internal structure of the input media file,supported formats are:
BMP, GIF, JPEG, MP3, MPEG4, PNG, TIFF

positional arguments:
  input       input media file

optional arguments:
  -h, --help  show this help message and exit
  -bl BL      maximum length for buffer representation
  -wt         show also absent / transparent fields

$ ./tools/pycrate_showmedia.py ./test/res/xkcd_wireless_signal.png 
### PNG ###
 <sig [PNG signature] : '\x89PNG\r\n\x1a\n'>
     ### PNGBody ###
      ### PNGChunk ###
       <len : 13>
       <type : 'IHDR'>
       ### IHDR ###
        <width : 238>
        <height : 415>
        <depth [bit depth] : 8>
        <color [color type] : 0 (Greyscale)>
        <comp [compression method] : 0 (inflate/deflate with sliding window)>
        <filter [filter method] : 0 (no interlace)>
        <interlace [interlace method] : 0 (no interlace)>
       <crc : 0x7d8cb12e>
      ### PNGChunk ###
       <len : 9>
       <type : 'pHYs'>
       <data :
        00 00 0c 4e 00 00 0c 4e 01                      | '\x00\x00\x0cN\x00\x00\x0cN\x01'>
       <crc : 0x7f778c23>
      ### PNGChunk ###
       <len : 792>
       <type : 'iCCP'>
       <data :
        50 68 6f 74 6f 73 68 6f 70 20 49 43 43 20 70 72 | 'Photoshop ICC pr'
        6f 66 69 6c 65 00 00 78 da 63 60 60 9e e0 e8 e2 | 'ofile\x00\x00x\xdac``\x9e\xe0\xe8\xe2'
        [...]
        32 fd fc ea eb 82 ef e1 3f 05 7e 9d fa d3 fa cf | '2\xfd\xfc\xea\xeb\x82\xef\xe1?\x05~\x9d\xfa\xd3\xfa\xcf'
        f1 ff 7f 00 0d 00 0f 34                         | '\xf1\xff\x7f\x00\r\x00\x0f4'>
       <crc : 0xfa96f15d>
      ### PNGChunk ###
       <len : 32>
       <type : 'cHRM'>
       <data :
        00 00 6e 27 00 00 73 af 00 00 df f2 00 00 83 30 | "\x00\x00n'\x00\x00s\xaf\x00\x00\xdf\xf2\x00\x00\x830"
        00 00 77 43 00 00 c8 0a 00 00 34 95 00 00 2e dc | '\x00\x00wC\x00\x00\xc8\n\x00\x004\x95\x00\x00.\xdc'>
       <crc : 0x20bf171a>
      ### PNGChunk ###
       <len : 21130>
       <type : 'IDAT'>
       <data :
        78 da ed bd 79 50 8d fd 1f ff ff bc ce 39 73 4e | 'x\xda\xed\xbdyP\x8d\xfd\x1f\xff\xff\xbc\xce9sN'
        db b4 37 95 32 b4 19 94 06 2d 7e 11 26 b2 fc 10 | '\xdb\xb47\x952\xb4\x19\x94\x06-~\x11&\xb2\xfc\x10'
        [...]
        91 a3 d8 5b fc e1 cb 51 fd ab fb c9 cc ec ee 21 | '\x91\xa3\xd8[\xfc\xe1\xcbQ\xfd\xab\xfb\xc9\xcc\xec\xee!'
        7d 70 6e f3 18 ce c1 c1 6d 8c 81 44 32 cf 51 ba | '}pn\xf3\x18\xce\xc1\xc1m\x8c\x81D2\xcfQ\xba'
        ...>
       <crc : 0xa9fbdd38>
      ### PNGChunk ###
       <len : 0>
       <type : 'IEND'>
       <data : >
       <crc : 0xae426082>
  • What is pycrate Pycrate is a french word for qualifying bad wine (when it's close to vinegar !). The present software library has nothing to do with wine (except it is developped in France), it is sim

 相关资料
  • 问题 你需要使用Base64格式解码或编码二进制数据。 解决方案 base64 模块中有两个函数 b64encode() and b64decode() 可以帮你解决这个问题。例如; >>> # Some byte data >>> s = b'hello' >>> import base64 >>> # Encode as Base64 >>> a = base64.b64encode(s)

  • Firestore则不同,它需要冗余数据来有效地访问数据,但假设我跟踪了1000个人,如果我需要通过查询我跟踪的每15个用户的数据并使用方法来获得所有这些用户的帖子,那么查询之间可能会有未读的帖子,因为我们使用获得帖子,如何在Firestore中为社交媒体应用程序构造数据

  • 本文向大家介绍FFmpeg获取网络摄像头数据解码,包括了FFmpeg获取网络摄像头数据解码的使用技巧和注意事项,需要的朋友参考一下 对USB摄像头实时编码,在前面已经探讨过了。这次改变下思路,尝试去截取网络摄像头的H264码流,将其解码播放。 这里的测试代码,是在海康摄像头的基础上进行的。 解码的大致流程和以前的保持一致,只不过增加了部分函数。 FFmpeg打开媒体文件并查看媒体文件的信息,有三个

  • 问题内容: 我有一个必须符合且包含值数组的对象。我怎么能用/对其进行编码/解码?额外的问题:如何编码最紧凑?(它必须进入保存的Game Center状态数据,其大小是有限的。) 理想情况下,我只想写一个等于数组大小的an ,然后写乘a的64位乘以类似的方式读取它。我可以这样做吗? 不起作用。 问题答案: 这是将数组编码为字节数组的可能解决方案。它的灵感来自于如何使用NSCoding序列化C数组?。

  • 套接字地址结构 地址结构 说明 sockaddr_un UNIX通信域套接字地址 sockaddr_in IPv4套接字地址 sockaddr_in6 IPv6套接字地址 sockddr_un struct sockaddr_un { sa_familly_t sun_family; char sun_path[]; } sockaddr_in /* 在头文件<netinet/in

  • 基础知识 一般说来,蜂鸣器演奏音乐只能是单音频率,它不包含相应幅度的谐波频率,也就是说不能象电子琴那样能奏出多种音色的声音。因此蜂鸣器奏乐只需弄清楚两个概念即可,也就是“音调”和“节拍”。音调表示一个音符唱多高的频率,节拍表示一个音符唱多长的时间。十二平均律就规定了每一个音符的标准频率。 十二平均律,是一种音乐定律方法,将一个纯八度平均分成十二等份,每等分称为半音,是最主要的调音法。十二平均律中各

  • 包括有以下 type: config _id 为 kibana5 的 version。内容主要是 defaultIndex,设置默认的 index_pattern. search _id 为 discover 上保存的搜索名称。内容主要是 title,column,sort,version,description,hits 和 kibanaSavedObjectMeta。kibanaSavedOb

  • 输入数据上有一个例子。 这是我在向服务器发出适当请求后收到的数据示例。我得到了这样的数据。如何序列化此类数据?由于嵌套结构列表的动态名称,我的尝试失败了。如何正确处理这种嵌套动态结构?