阅读背景:

如何在python3中有效地将位从一个字节数组打包到另一个字节数组?

来源:互联网 

I have a fairly large byte array in python. In the simplest situation the byte array only contains 0 or 1 values (0x00, 0x01), also the array is always a multiple of 8 in length. How can I pack these "bits" into another byte array (it doesn't need to be mutable) so the source index zero goes to the MSB of the first output byte etc.I have a fairly large byte array in python. In




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: