146 size_t* bits_written);
bool bit_buffer_has_partial_byte(const BitBuffer *buf)
Check whether a BitBuffer instance contains a partial byte (i.e. the bit count is not divisible by 8)...
Definition bit_buffer.c:187
void bit_buffer_set_byte_with_parity(BitBuffer *buff, size_t index, uint8_t byte, bool parity)
Set byte and parity bit value at a specified index in a BitBuffer instance.
Definition bit_buffer.c:258
size_t bit_buffer_get_size_bytes(const BitBuffer *buf)
Get a BitBuffer instance's data size (i.e. the amount of stored data), in bytes.
Definition bit_buffer.c:211
void bit_buffer_set_size_bytes(BitBuffer *buf, size_t new_size_bytes)
Resize a BitBuffer instance to a new size, in bytes.
Definition bit_buffer.c:277
void bit_buffer_copy(BitBuffer *buf, const BitBuffer *other)
Copy another BitBuffer instance's contents to this one, replacing all of the original data.
Definition bit_buffer.c:45
void bit_buffer_write_bytes_with_parity(const BitBuffer *buf, void *dest, size_t size_bytes, size_t *bits_written)
Write a BitBuffer instance's entire contents to an arbitrary memory location.
Definition bit_buffer.c:136
uint8_t bit_buffer_get_byte_from_bit(const BitBuffer *buf, size_t index_bits)
Get a byte value starting from the specified bit index in a BitBuffer instance.
Definition bit_buffer.c:224
void bit_buffer_copy_left(BitBuffer *buf, const BitBuffer *other, size_t end_index)
Copy all BitBuffer instance's contents to this one, ending with end_index, replacing all of the origi...
Definition bit_buffer.c:67
void bit_buffer_free(BitBuffer *buf)
Delete a BitBuffer instance.
Definition bit_buffer.c:28
void bit_buffer_copy_bytes_with_parity(BitBuffer *buf, const uint8_t *data, size_t size_bits)
Copy a byte with parity array to a BitBuffer instance, replacing all of the original data.
Definition bit_buffer.c:96
void bit_buffer_set_byte(BitBuffer *buf, size_t index, uint8_t byte)
Set byte value at a specified index in a BitBuffer instance.
Definition bit_buffer.c:249
void bit_buffer_append_right(BitBuffer *buf, const BitBuffer *other, size_t start_index)
Append a BitBuffer's instance contents to this one, starting from start_index.
Definition bit_buffer.c:288
void bit_buffer_copy_bytes(BitBuffer *buf, const uint8_t *data, size_t size_bytes)
Copy a byte array to a BitBuffer instance, replacing all of the original data.
Definition bit_buffer.c:77
void bit_buffer_append(BitBuffer *buf, const BitBuffer *other)
Append all BitBuffer's instance contents to this one.
Definition bit_buffer.c:284
void bit_buffer_copy_bits(BitBuffer *buf, const uint8_t *data, size_t size_bits)
Copy a byte array to a BitBuffer instance, replacing all of the original data.
Definition bit_buffer.c:86
size_t bit_buffer_get_size(const BitBuffer *buf)
Get a BitBuffer instance's data size (i.e. the amount of stored data), in bits.
Definition bit_buffer.c:205
void bit_buffer_set_size(BitBuffer *buf, size_t new_size)
Resize a BitBuffer instance to a new size, in bits.
Definition bit_buffer.c:270
void bit_buffer_append_bit(BitBuffer *buf, bool bit)
Append a bit to a BitBuffer instance.
Definition bit_buffer.c:323
const uint8_t * bit_buffer_get_parity(const BitBuffer *buf)
Get the pointer to the parity data of a BitBuffer instance.
Definition bit_buffer.c:243
void bit_buffer_append_byte(BitBuffer *buf, uint8_t byte)
Append a byte to a BitBuffer instance.
Definition bit_buffer.c:301
void bit_buffer_copy_right(BitBuffer *buf, const BitBuffer *other, size_t start_index)
Copy all BitBuffer instance's contents to this one, starting from start_index, replacing all of the o...
Definition bit_buffer.c:57
size_t bit_buffer_get_capacity_bytes(const BitBuffer *buf)
Get a BitBuffer instance's capacity (i.e. the maximum possible amount of data), in bytes.
Definition bit_buffer.c:199
uint8_t bit_buffer_get_byte(const BitBuffer *buf, size_t index)
Get a byte value at a specified index in a BitBuffer instance.
Definition bit_buffer.c:217
bool bit_buffer_starts_with_byte(const BitBuffer *buf, uint8_t byte)
Check whether a BitBuffer instance's contents start with the designated byte.
Definition bit_buffer.c:193
void bit_buffer_write_bytes_mid(const BitBuffer *buf, void *dest, size_t start_index, size_t size_bytes)
Write a slice of BitBuffer instance's contents to an arbitrary memory location.
Definition bit_buffer.c:175
void bit_buffer_reset(BitBuffer *buf)
Clear all data from a BitBuffer instance.
Definition bit_buffer.c:36
void bit_buffer_append_bytes(BitBuffer *buf, const uint8_t *data, size_t size_bytes)
Append a byte array to a BitBuffer instance.
Definition bit_buffer.c:312
const uint8_t * bit_buffer_get_data(const BitBuffer *buf)
Get the pointer to a BitBuffer instance's underlying data.
Definition bit_buffer.c:237
void bit_buffer_write_bytes(const BitBuffer *buf, void *dest, size_t size_bytes)
Write a BitBuffer instance's entire contents to an arbitrary memory location.
Definition bit_buffer.c:128
BitBuffer * bit_buffer_alloc(size_t capacity_bytes)
Allocate a BitBuffer instance.
Definition bit_buffer.c:14
Definition bit_buffer.c:7