BitUtils class

Class container for bit utility functions.

Constructors

BitUtils()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

areBitsSet(int value, int bitMask) → bool
Get if the specified bits are set.
bitsToBigInt(List<bool> bits, {Endian endian = Endian.little}) → BigInt
Packs bits into a BigInt, in the given bit endian order.
bitsToInt(List<bool> bits, {Endian endian = Endian.little}) → int
Packs bits into an int, in the given bit endian order.
fromString(String bitString) → List<bool>
Parses a string of '0'/'1' characters into a list of bits.
intIsBitSet(int value, int bitNum) → bool
Get if the specified bit is set.
resetBit(int value, int bitNum) → int
Reset the specified bit.
resetBits(int value, int bitMask) → int
Reset the specified bits.
reverseBits8(int b) → int
Reverses the bit order within a single byte.
setBit(int value, int bitNum) → int
Set the specified bit.
setBits(int value, int bitMask) → int
Set the specified bits.