bit_array 1.0.0 copy "bit_array: ^1.0.0" to clipboard
bit_array: ^1.0.0 copied to clipboard

outdated

A bit array (also known as BitMap, BitSet, BitString, or BitVector) is an array data structure that compactly stores bits.

example/example.dart

import 'package:bit_array/bit_array.dart';

main() {
  final array = new BitArray(1024);
  array[12] = true;
  array.setBit(123);
  array.invertBit(200);
  array.clearBit(12);
  print(array.asIntIterable().toList()); // prints [123, 200]

  final other = new BitArray(1024);
  other[123] = true;

  final and = array & other;
  print(and.asIntIterable().toList()); // prints [123]
}
11
likes
0
pub points
84%
popularity

Publisher

verified publisheragilord.com

A bit array (also known as BitMap, BitSet, BitString, or BitVector) is an array data structure that compactly stores bits.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on bit_array