These functions operate on bit arrays.
ba_create creates one and ba_destroy it.
ba_copy makes a copy of one, and ba_resize changes its size.
The bit arrays resize themselves automatically,
but ba_resize can be used to get rid of extra memory allocated for
the array, or to make sure there is enough memory allocated for the array
(so that further operations are guaranteed to work).

ba_set sets one element (bit) in the array to 1.
ba_clear clears one element (sets it to 0),
ba_clear_all clears all elements.
ba_query returns the current value of an element.

ba_and_ba, ba_or_ba, ba_xor_ba, and ba_or_ba
do logical operations on two arrays.
The result will be stored in the first one.
ba_not will invert all elements in the array.