26 ba->
size = (size>>3) + 1;
28 ba->
array = malloc( ba->
size *
sizeof( uint8_t ));
31 printf(
"Failed to allocate a Bit_Array \n");
36 for( i = 0 ; i < ba->
size ; i++ )
44 for( i = 0 ; i < ba->
size ; i++ )
59 printf(
"Trying to copy to a different size Bit_Array\n");
72 unsigned int size = ba->
size * 8;
74 printf(
"Array size is %d \n", size);
76 for( i = 0 ; i < size; i++ ) {
void Bit_Array_dump(struct Bit_Array *ba)
Prints a Bit_Array on standard output.
uint64_t size
The number of uint8_t array contains.
void Bit_Array_release(struct Bit_Array *ba)
Bit_Array deinitializer.
void Bit_Array_init(struct Bit_Array *ba, uint64_t size)
Bit_Array initializer.
uint64_t real_size
The number of bits the array contains.
static uint8_t Bit_Array_get(struct Bit_Array *ba, uint64_t key)
Gets a bit in a Bit_Array.
void Bit_Array_replicate(struct Bit_Array *dest, struct Bit_Array *src)
Copies a Bit_Array into another.