• <tfoot id='06sMp'></tfoot>

    1. <small id='06sMp'></small><noframes id='06sMp'>

      <i id='06sMp'><tr id='06sMp'><dt id='06sMp'><q id='06sMp'><span id='06sMp'><b id='06sMp'><form id='06sMp'><ins id='06sMp'></ins><ul id='06sMp'></ul><sub id='06sMp'></sub></form><legend id='06sMp'></legend><bdo id='06sMp'><pre id='06sMp'><center id='06sMp'></center></pre></bdo></b><th id='06sMp'></th></span></q></dt></tr></i><div id='06sMp'><tfoot id='06sMp'></tfoot><dl id='06sMp'><fieldset id='06sMp'></fieldset></dl></div>
      • <bdo id='06sMp'></bdo><ul id='06sMp'></ul>

      <legend id='06sMp'><style id='06sMp'><dir id='06sMp'><q id='06sMp'></q></dir></style></legend>

        在 Python 中进行位域操作的最佳方法是什么?

        时间:2023-09-28

          <tbody id='D8JmR'></tbody>

        <small id='D8JmR'></small><noframes id='D8JmR'>

        • <i id='D8JmR'><tr id='D8JmR'><dt id='D8JmR'><q id='D8JmR'><span id='D8JmR'><b id='D8JmR'><form id='D8JmR'><ins id='D8JmR'></ins><ul id='D8JmR'></ul><sub id='D8JmR'></sub></form><legend id='D8JmR'></legend><bdo id='D8JmR'><pre id='D8JmR'><center id='D8JmR'></center></pre></bdo></b><th id='D8JmR'></th></span></q></dt></tr></i><div id='D8JmR'><tfoot id='D8JmR'></tfoot><dl id='D8JmR'><fieldset id='D8JmR'></fieldset></dl></div>
          1. <tfoot id='D8JmR'></tfoot>

              • <legend id='D8JmR'><style id='D8JmR'><dir id='D8JmR'><q id='D8JmR'></q></dir></style></legend>
                  <bdo id='D8JmR'></bdo><ul id='D8JmR'></ul>

                  本文介绍了在 Python 中进行位域操作的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在通过 UDP 读取一些 MPEG 传输流协议,其中包含一些时髦的位域(例如长度为 13).我正在使用struct"库进行广泛的拆包,但是有没有一种简单的方法可以说抓住接下来的 13 位"而不是手动调整位操作?我想要类似于 C 处理位字段的方式(无需恢复为 C).

                  I'm reading some MPEG Transport Stream protocol over UDP and it has some funky bitfields in it (length 13 for example). I'm using the "struct" library to do the broad unpacking, but is there a simple way to say "Grab the next 13 bits" rather than have to hand-tweak the bit manipulation? I'd like something like the way C does bit fields (without having to revert to C).

                  建议?

                  推荐答案

                  这是一个经常被问到的问题.上面有一个 ASPN Cookbook 条目,过去曾为我服务过.

                  It's an often-asked question. There's an ASPN Cookbook entry on it that has served me in the past.

                  还有一个一个人希望从执行此操作的模块中看到的广泛需求页面.

                  这篇关于在 Python 中进行位域操作的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何使用 Postman 表单数据在 Django REST Framework 中发布嵌套数组? 下一篇:在 Python 中接收广播数据包

                  相关文章

                    <i id='EE9n0'><tr id='EE9n0'><dt id='EE9n0'><q id='EE9n0'><span id='EE9n0'><b id='EE9n0'><form id='EE9n0'><ins id='EE9n0'></ins><ul id='EE9n0'></ul><sub id='EE9n0'></sub></form><legend id='EE9n0'></legend><bdo id='EE9n0'><pre id='EE9n0'><center id='EE9n0'></center></pre></bdo></b><th id='EE9n0'></th></span></q></dt></tr></i><div id='EE9n0'><tfoot id='EE9n0'></tfoot><dl id='EE9n0'><fieldset id='EE9n0'></fieldset></dl></div>
                      <legend id='EE9n0'><style id='EE9n0'><dir id='EE9n0'><q id='EE9n0'></q></dir></style></legend>

                        <bdo id='EE9n0'></bdo><ul id='EE9n0'></ul>

                      <small id='EE9n0'></small><noframes id='EE9n0'>

                      <tfoot id='EE9n0'></tfoot>