• <small id='N71vO'></small><noframes id='N71vO'>

      <tfoot id='N71vO'></tfoot>

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

      1. <legend id='N71vO'><style id='N71vO'><dir id='N71vO'><q id='N71vO'></q></dir></style></legend>
        • <bdo id='N71vO'></bdo><ul id='N71vO'></ul>

        不寻常的整数编码到字节 - 这是什么方案?

        时间:2023-06-03
        <legend id='cKno8'><style id='cKno8'><dir id='cKno8'><q id='cKno8'></q></dir></style></legend>

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

            <tfoot id='cKno8'></tfoot>

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

                  本文介绍了不寻常的整数编码到字节 - 这是什么方案?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  使用什么整数编码方案来实现以下,我们如何在.Net中做到这一点:

                  What Integer encoding scheme is used to achieve the following, and how can we do this in .Net:

                  127 = 7F
                  128 = 8001
                  255 = FF01
                  256 = 8002
                  500 = F403
                  

                  推荐答案

                  不确定它是否有正式名称,它是 7 位编码.它是一种可变长度编码,如果后面有另一个字节,则设置一个字节的高位.字节顺序是 little-endian.

                  Not so sure it has an official name, it is a 7-bit encoding. It is a variable length encoding, the high bit of a byte is set if another byte follows. Byte order is little-endian.

                  .NET Framework 使用它,Write7BitEncodedInt() 方法.由 BinaryWriter.WriteString() 方法使用,它节省空间,因为大多数实用字符串少于 128 个字符.

                  The .NET Framework uses it, Write7BitEncodedInt() method. Used by the BinaryWriter.WriteString() method, it saves space since most practical strings have less than 128 characters.

                  所以 F403 => 03F4 => |0000011|1110100|=> |00000001|11110100|=> 0x1F4 == 500

                  So F403 => 03F4 => |0000011|1110100| => |00000001|11110100| => 0x1F4 == 500

                  这篇关于不寻常的整数编码到字节 - 这是什么方案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:C# BinaryFormatter - 使用另一个命名空间中的对象反 下一篇:VB6:二进制文件是如何编码的?使用 Put 语句

                  相关文章

                  最新文章

                1. <small id='3v4Us'></small><noframes id='3v4Us'>

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

                    • <bdo id='3v4Us'></bdo><ul id='3v4Us'></ul>