BitArray.dim

size_t dim() @property const @nogc nothrow pure @safe

Returns

Dimension i.e. the number of native words backing this BitArray.

Technically, this is the length of the underlying array storing bits, which is equal to ceil(length / (size_t.sizeof * 8)), as bits are packed into size_t units.