Java Iterate Bits in Byte Array

前端 未结 7 1574
夕颜
夕颜 2020-12-08 02:49

How can i iterate bits in a byte array?

7条回答
  •  误落风尘
    2020-12-08 03:09

    I needed some bit streaming in my application. Here you can find my BitArray implementation. It is not a real iterator pattern but you can ask for 1-32 bits from the array in a streaming way. There is also an alternate implementation called BitReader later in the file.

提交回复
热议问题