开发者

Technical term for bit packing

By bit packing I mean since int is of 4 bytes, and if we store 1 inside the int, remaining bits will be wasted.

So I'll be packing the next type e.g short's value 2, in the int variable (by right left shifts)开发者_Python百科.

What is this technique called?


You said it yourself; Bit Packing.

If you are packing individual bits, the result would be a Bitfield. But in this case of two shorts in the space of an integer, it could also be just byte packing.

But all-in all it is Packing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜