Note that this provides “bit arrays” of constant size (sizeof(int) * 8 bits). Maybe that’s OK for you, or maybe you will want to build something on top of this. (Or re-use whatever some library provides.)

This will use less memory than bool arrays… HOWEVER… The code the compiler generates to access these bits will be larger and slower. So unless you have a large number of objects that need to contain these bit arrays, it might have a net-negative impact on both speed and memory usage.

I came across this question as I am writing a bit array framework that is intent to manage large amounts of ‘bits’ similar to Java BitSet. I was looking to see if the name I decided on was in conflict with other Objective-C frameworks.

Anyway, I’m just starting this and am deciding whether to post it on SourceForge or other open source hosting sites.

Let me know if you are interested

Edit: I’ve created the project, called BitArray, on SourceForge. The source is in the SF SVN repository and I’ve also uploaded a compiled framework. This LINK will get your there.