Questions tagged [cfbitvector]

5 questions
4
votes
1 answer

CFRange cannot cross-byte when using CFBitVectorGetBits

Byte a[2]={85, 15}; Byte b[2]={0}; CFBitVectorRef bv1 = CFBitVectorCreate(kCFAllocatorDefault, a, 16); CFRange r1 = {3, 8}; CFBitVectorGetBits(bv1, r1, b); Byte a[2] are "0101 0101 0000 1111", I want to cut the {3,8} (1010 1000) of CFRange into…
Witeman
  • 49
  • 4
1
vote
1 answer

How to store CFBitVector (or any CFType) in Core Data using CFData/NSData?

I have limited experience working with the Core Foundation types & collections, so apologies if this is obvious. I'm using the CFBitVector type to store some bit sequences, and I need to store it in a binary data format (so that it can be added to a…
Stuart
  • 36,683
  • 19
  • 101
  • 139
0
votes
1 answer

How to bitwise-and CFBitVector

I have two instances of CFMutableBitVector, like so: CFBitVectorRef ref1, ref2; How can I do bit-wise operations to these guys? For right now, I only care about and, but obviously xor, or, etc would be useful to know. Obviously I can iterate…
Kurt Spindler
  • 1,311
  • 1
  • 14
  • 22
0
votes
1 answer

Why is CFBit defined as a UInt32?

Apple documents CFBit as being a UInt32, but I'm confused as to why. Doesn't that defeat the purpose of using a bit vector if each bit is defined with 32 bits? Am I missing something?
tnev
  • 376
  • 3
  • 16
0
votes
2 answers

CFBitVector stored as an attribute to a coredata object

I am attempting to create a fingerprint for an object in coreData, and want to set it as attribute to an object. I figured CFBitArray is the way to go. I am trying to figure out how to save this per object: Here is an example Object…
William Falcon
  • 9,813
  • 14
  • 67
  • 110