|
CCSDS 124.0-B-1 C 1.0.0
CCSDS 124.0-B-1 Lossless Compression
|
CCSDS 124.0-B-1 encoding functions (COUNT, RLE, BE). More...
#include "ccsds124.h"Go to the source code of this file.
Functions | |
Counter Encoding (COUNT) | |
Implements CCSDS 124.0-B-1 Section 5.2 encoding schemes:
CCSDS Section 5.2.2, Table 5-1, Equation 9. Encodes positive integers 1 ≤ A ≤ 2^16 - 1:
| |
| int | ccsds124_count_encode (bitbuffer_t *output, uint32_t A) |
| Counter encoding (CCSDS Section 5.2.2, Equation 9). | |
Run-Length Encoding (RLE) | |
CCSDS Section 5.2.3, Equation 10. RLE(a) = COUNT(C₀) ∥ COUNT(C₁) ∥ ... ∥ COUNT(C_{H(a)-1}) ∥ '10' where Cᵢ = 1 + (count of consecutive '0' bits before i-th '1' bit) and H(a) = Hamming weight (number of '1' bits in a)
| |
| int | ccsds124_rle_encode (bitbuffer_t *output, const bitvector_t *input) |
| Run-length encoding (CCSDS Section 5.2.3, Equation 10). | |
Bit Extraction (BE) | |
CCSDS Section 5.2.4, Equation 11. BE(a, b) = a_{g_{H(b)-1}} ∥ ... ∥ a_{g₁} ∥ a_{g₀} where gᵢ is the position of the i-th '1' bit in b (MSB to LSB order) Extracts bits from 'a' at positions where 'b' has '1' bits. Output order: MSB to LSB (reverse order of finding '1' bits)
| |
| int | ccsds124_bit_extract (bitbuffer_t *output, const bitvector_t *data, const bitvector_t *mask) |
| Bit extraction (CCSDS Section 5.2.4, Equation 11). | |
| int | ccsds124_bit_extract_forward (bitbuffer_t *output, const bitvector_t *data, const bitvector_t *mask) |
| Bit extraction in forward order (LSB to MSB). | |
CCSDS 124.0-B-1 encoding functions (COUNT, RLE, BE).
Definition in file encode.c.