Kaitai Struct -A new way to develop parsers for binary structures- needs Go parser :) (http://kaitai.io/)

agolangf · · 515 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p><a href="http://kaitai.io/">http://kaitai.io/</a> Notice: C++/STL C# Java JavaScript Perl PHP Python Ruby ... but no Go yet :) An issue was posted: <a href="https://github.com/kaitai-io/kaitai_struct/issues/146">https://github.com/kaitai-io/kaitai_struct/issues/146</a> Help appreciated!</p> <hr/>**评论:**<br/><br/>twek: <pre><p>Interesting, but why this over protobuf</p></pre>zem: <pre><p>protobufs have their own wire format; they are for when you want to specify the contents and let protobuf take care of the serialisation/deserialisatoin.</p> <p>kaitai is for when the binary format is already specified by someone else, and you want to define a mapping between that and your memory format.</p></pre>twek: <pre><p>Well that makes it much more interesting. At work I have to deal with alot of preexisting binary formats.</p></pre>Hexodam: <pre><p>Extremely interesting project</p></pre>qu33ksilver: <pre><p>This is great ! At work, I am having to parse the ADSB spec manually. And I was looking for a way to make the code readable and maintanable.</p> <p>Question - will this library help me to parse any no. of bits from a no. of bytes ?</p> <p>For eg. lets say that the data part of a msg has 56 bits. Now I need to parse 5,5,2 and 1 bits from the first. Can this be easily achieved by the library ? Source - <a href="http://adsb-decode-guide.readthedocs.io/en/latest/content/airborne-position.html" rel="nofollow">http://adsb-decode-guide.readthedocs.io/en/latest/content/airborne-position.html</a></p> <p>EDIT: Answering my question myself. Yes, its possible - <a href="http://doc.kaitai.io/user_guide.html#_bit_sized_integers" rel="nofollow">http://doc.kaitai.io/user_guide.html#_bit_sized_integers</a> So yes ! I am freaking excited about a golang export of this.</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

515 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传