How to efficiently read bits out of bytes?

前端 未结 4 1933
野的像风
野的像风 2021-01-02 02:24

I\'m working on a project that includes WebSockets, and data between the server (Node.js) and the client (Chrome) is sent using a custom (very simple) format for data exchan

4条回答
  •  难免孤独
    2021-01-02 03:08

    if endian-ness is taken care, you can access it as an int or a long int array. There is another possibily of not using bit 3 and bit 7

提交回复
热议问题