isPowerOfTwo property

bool get isPowerOfTwo

Whether the byte count is a power of two.

Implementation

bool get isPowerOfTwo {
  final bytes = _converter.bytes;
  return bytes > BigInt.zero && (bytes & (bytes - BigInt.one)) == BigInt.zero;
}