GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LSEC / V6-1-0 > lsec / sun-gcc
#include <stdio.h>
Typedefs | |
typedef struct LSEC_compression_ | LSEC_compression |
Declaration of the opaque compression structure. | |
Functions | |
LSEC_compression * | LSEC_newCompression (unsigned intnbits, const char *name) |
void | LSEC_deleteCompression (LSEC_compression *cpr) |
Free the memory associated with the compression structure. | |
void | LSEC_clearCompression (LSEC_compression *cpr) |
Clear the compression structrure of any data from a previous cycle. | |
unsigned | LSEC_checkCompression (LSEC_compression *cpr) |
Check if there were errors during the histogram or encode operations. | |
void | LSEC_reportCompression (LSEC_compression *cmp, FILE *fp) |
Describe the contents of a compression structure. | |
void | LSEC_zeroBin (LSEC_compression *cpr, unsigned int bin) |
Set the selected bin of the histogram to zero. | |
unsigned int | LSEC_getBin (LSEC_compression *cpr, unsigned int bin) |
Return the contents of one bin of the histogram. | |
unsigned int | LSEC_getCount (LSEC_compression *cpr) |
Return the number of non-zero bins in the histogram. | |
unsigned | LSEC_process (LSEC_compression *cpr) |
Build the lookup, frequency and probability tables required by the APE. | |
unsigned * | LSEC_pack (LSEC_compression *cpr, unsigned *buffer) |
Pack the tables of a compression structure into a buffer. | |
unsigned | LSEC_packedSize32 (LSEC_compression *cpr) |
Calculate the size of a packed compression structure. |
unsigned LSEC_checkCompression | ( | LSEC_compression * | cpr | ) |
Check if there were errors during the histogram or encode operations.
cpr | Pointer to a compression structure |
LSEC_SYMOOR | If any of the symbols histogrammed or encoded by this compression structure were out of range | |
LSEC_AWEFAIL | If there were any error during the encoding | |
LSEC_SUCCESS | If there were no errors |
void LSEC_clearCompression | ( | LSEC_compression * | cpr | ) |
Clear the compression structrure of any data from a previous cycle.
cpr | Pointer to an allocated, initialised, compression structure |
void LSEC_deleteCompression | ( | LSEC_compression * | cpr | ) |
Free the memory associated with the compression structure.
cpr | Pointer to an allocated compression structure |
unsigned int LSEC_getBin | ( | LSEC_compression * | cpr, | |
unsigned int | bin | |||
) |
Return the contents of one bin of the histogram.
cpr | Pointer to an allocated, initialised, populated, compression structure | |
bin | ID of one of the bins of the histogram |
unsigned int LSEC_getCount | ( | LSEC_compression * | cpr | ) |
Return the number of non-zero bins in the histogram.
cpr | Pointer to a compression structure |
unsigned* LSEC_pack | ( | LSEC_compression * | cpr, | |
unsigned * | buffer | |||
) |
Pack the tables of a compression structure into a buffer.
This routine selects sufficient data from the tables of the compression structure to be able to recreate the tables required to decompress the data, and pack it into the consignment
buffer | Pointer to the start of the buffer to place the packed structure | |
cpr | Pointer to an initialised, populated and processed compression structure |
unsigned LSEC_packedSize32 | ( | LSEC_compression * | cpr | ) |
Calculate the size of a packed compression structure.
This routine calculates the number of 32-bit words required to hold the packed compression structure
cpr | Pointer to a compression structure |
unsigned LSEC_process | ( | LSEC_compression * | cpr | ) |
Build the lookup, frequency and probability tables required by the APE.
cpr | Pointer to an allocated, initialised, populated, compression structure |
LSEC_SUCCESS | If the processing goes well |
void LSEC_reportCompression | ( | LSEC_compression * | cmp, | |
FILE * | fp | |||
) |
Describe the contents of a compression structure.
This routine formats the compression structure as ASCII text and writes it to the specified file
cmp | Pointer to the compression structure | |
fp | Pointer to the file used as the destination |
void LSEC_zeroBin | ( | LSEC_compression * | cpr, | |
unsigned int | bin | |||
) |
Set the selected bin of the histogram to zero.
This indicates that this symbol will be selectively removed from the uncompressed data stream before encoding
cpr | Pointer to an allocated, initialised, populated, compression structure | |
bin | ID of one of the bins of the histogram |