BigBitOperations class

Provides bit-level operations for BigByteConverter.

Constructors

BigBitOperations(BigByteConverter _converter)
Creates a BigBitOperations instance for the given BigByteConverter.
const

Properties

bitLength int
The minimum number of bits needed to represent this value.
no setter
gigabits double
Bits in gigabits (1 Gb = 1,000,000,000 bits).
no setter
hashCode int
The hash code for this object.
no setterinherited
isByteAligned bool
Whether the bit count is divisible by 8 (byte-aligned).
no setter
isL1CacheAligned bool
Checks if this size is aligned to L1 cache-line boundary (64 bytes).
no setter
isL2CacheAligned bool
Checks if this size is aligned to L2 cache-line boundary (128 bytes).
no setter
isL3CacheAligned bool
Checks if this size is aligned to L3 cache-line boundary (256 bytes).
no setter
isPowerOfTwo bool
Whether the byte count is a power of two.
no setter
kilobits double
Bits in kilobits (1 kb = 1000 bits).
no setter
megabits double
Bits in megabits (1 Mb = 1,000,000 bits).
no setter
popCount int
The number of set bits (1s) in the binary representation.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
terabits double
Bits in terabits (1 Tb = 1,000,000,000,000 bits).
no setter
totalBits BigInt
Total number of bits as BigInt.
no setter

Methods

alignDownTo(int alignment) BigByteConverter
Aligns down to the specified alignment.
alignDownToL1CacheLine() BigByteConverter
Aligns down to the previous L1 cache-line boundary (64 bytes).
alignDownToL2CacheLine() BigByteConverter
Aligns down to the previous L2 cache-line boundary (128 bytes).
alignDownToL3CacheLine() BigByteConverter
Aligns down to the previous L3 cache-line boundary (256 bytes).
alignTo(int alignment) BigByteConverter
Aligns the byte count up to the specified alignment.
alignToL1CacheLine() BigByteConverter
Aligns up to the next L1 cache-line boundary (64 bytes).
alignToL2CacheLine() BigByteConverter
Aligns up to the next L2 cache-line boundary (128 bytes).
alignToL3CacheLine() BigByteConverter
Aligns up to the next L3 cache-line boundary (256 bytes).
clearBit(int index) BigByteConverter
Returns a new BigByteConverter with the bit at index cleared to 0.
humanize({int precision = 2}) String
Human-readable bit format (e.g., "8 Kb", "1.5 Mb").
isAlignedTo(int alignment) bool
Returns true if the byte count is aligned to alignment bytes.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setBit(int index) BigByteConverter
Returns a new BigByteConverter with the bit at index set to 1.
shiftLeft(int count) BigByteConverter
Returns a new BigByteConverter with bits shifted left by count.
shiftRight(int count) BigByteConverter
Returns a new BigByteConverter with bits shifted right by count.
testBit(int index) bool
Tests if the bit at index is set (1).
toBinaryString() String
Returns the binary representation of the bits.
toHexString({bool uppercase = false}) String
Returns the hexadecimal representation of the bytes.
toString() String
A string representation of this object.
inherited

Operators

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