A data structure for an array of single bit values, usually with emphasis on memory-efficient storage and performance.
A bit Vector stores an array of single bit values (0,1) usually in a memory-efficient (i.e. packed) way. Typical operations on a bit vector are
- access to single bits
- boolean operations between two bit vectors (AND, OR, XOR, NOT)
- vector-like operations (append/prepend, insertion of bits)
- shift operations
Implementation are often optimized to use operations provided by the CPU to perform these operations in an performant way.