Class Utils_BitSet
-
- All Implemented Interfaces:
public class Utils_BitSet
Created by Djamil on 05/01/2018. Check if we can use https://github.com/tomgibara/bits or stick with https://developer.android.com/reference/java/util/BitSet.html
-
-
Constructor Summary
Constructors Constructor Description Utils_BitSet()
-
Method Summary
Modifier and Type Method Description static BitSet
fromByteArrayReverse(Array<byte> bytes)
Convert a byte array into a BitSet, MSB first Opposite of toByteArrayReverse ex.: {0x65, 0x80, ...} returns {1, 2, 5, 7, 8, ... static Array<byte>
toByteArrayReverse(BitSet bits)
Convert a BitSet into a byte array Opposite of fromByteArrayReverse static int
computeDataRate(Array<byte> buf, int captureDataRate)
Compute a data rate from a base data reate a a stream of bits WIP, not finished -
-
Method Detail
-
fromByteArrayReverse
static BitSet fromByteArrayReverse(Array<byte> bytes)
Convert a byte array into a BitSet, MSB first Opposite of toByteArrayReverse ex.: {0x65, 0x80, ...} returns {1, 2, 5, 7, 8, ...}
-
toByteArrayReverse
static Array<byte> toByteArrayReverse(BitSet bits)
Convert a BitSet into a byte array Opposite of fromByteArrayReverse
-
computeDataRate
static int computeDataRate(Array<byte> buf, int captureDataRate)
Compute a data rate from a base data reate a a stream of bits WIP, not finished
-
-
-
-