Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I implement a bit array in C / Objective C

iOS / Objective-C: I have a large array of boolean values.

This is an inefficient way to store these values – at least eight bits are used for each element when only one is needed.

How can I optimise?

like image 828
P i Avatar asked Sep 19 '10 02:09

P i


1 Answers

see CFMutableBitVector/CFBitVector for a CFType option

like image 103
justin Avatar answered Nov 15 '22 19:11

justin