|
CCSDS 124.0-B-1 C 1.0.0
CCSDS 124.0-B-1 Lossless Compression
|
Fixed-length bit vector implementation using 32-bit words. More...
Go to the source code of this file.
Functions | |
Initialization Functions | |
This module provides fixed-length bit vector operations optimized for CCSDS 124.0-B-1 compression. Uses 32-bit words with big-endian byte packing to match ESA/ESOC reference implementation.
| |
| int | bitvector_init (bitvector_t *bv, size_t num_bits) |
| Initialize a bit vector with specified length. | |
| void | bitvector_zero (bitvector_t *bv) |
| Set all bits to zero. | |
| void | bitvector_copy (bitvector_t *dest, const bitvector_t *src) |
| Copy bit vector contents. | |
Bitwise Operations | |
Implements bitwise operations as defined in CCSDS 124.0-B-1 Section 1.6.1. All operations work word-by-word for efficiency. | |
| void | bitvector_xor (bitvector_t *result, const bitvector_t *a, const bitvector_t *b) |
| Bitwise XOR operation. | |
| void | bitvector_or (bitvector_t *result, const bitvector_t *a, const bitvector_t *b) |
| Bitwise OR operation. | |
| void | bitvector_and (bitvector_t *result, const bitvector_t *a, const bitvector_t *b) |
| Bitwise AND operation. | |
| void | bitvector_not (bitvector_t *result, const bitvector_t *a) |
| Bitwise NOT operation. | |
| void | bitvector_left_shift (bitvector_t *result, const bitvector_t *a) |
| Left shift by one bit. | |
| void | bitvector_reverse (bitvector_t *result, const bitvector_t *a) |
| Reverse bit order. | |
Utility Functions | |
| size_t | bitvector_hamming_weight (const bitvector_t *bv) |
| Count number of set bits (Hamming weight). | |
| int | bitvector_equals (const bitvector_t *a, const bitvector_t *b) |
| Compare two bit vectors for equality. | |
Byte Conversion Functions | |
| int | bitvector_from_bytes (bitvector_t *bv, const uint8_t *data, size_t num_bytes) |
| Load bit vector from byte array. | |
| int | bitvector_to_bytes (const bitvector_t *bv, uint8_t *data, size_t num_bytes) |
| Store bit vector to byte array. | |
Fixed-length bit vector implementation using 32-bit words.
Definition in file bitvector.c.