decenc_aec.c(3)
π decenc_aec.c β Library Functions Manual π
okay bestie, pull up a chair, because we're decoding AND encoding AEC code streams today and it's honestly giving main character energy. this whole page lives in decenc_aec.c(3) β that's the manpage name, the whole Library Functions Manual vibe, and yes we're gonna read all of it together. no skimming, no cap. π¦
β¨ NAME β¨
decenc_aec.c β Decode/encode an AEC code stream.
πΈ SYNOPSIS πΈ
#include 'grib2_int.h'
#include <libaec.h>
#include <stdint.h>
#include <stdio.h>
π Functions
int dec_aec (unsigned char *cpack, g2int len, g2int nbits, g2int flags, g2int block_size, g2int rsi, unsigned char *cfld, g2int cfldlen)β Decode an AEC code stream specified in the CCSDS 121.0-B-3 Blue Book.int enc_aec (unsigned char *data, g2int ctemplen, g2int nbits, g2int flags, g2int block_size, g2int rsi, unsigned char *aecbuf, g2int *aecbuflen)β Encode data into an AEC code stream specified in the CCSDS 121.0-B-3 Blue Book.int g2c_dec_aec (unsigned char *cpack, int len, int nbits, int flags, int block_size, int rsi, unsigned char *cfld, int cfldlen)β Decode an AEC code stream specified in the CCSDS 121.0-B-3 Blue Book.int g2c_enc_aec (unsigned char *data, int ctemplen, int nbits, int flags, int block_size, int rsi, unsigned char *aecbuf, int *aecbuflen)β Encode data into an AEC code stream specified in the CCSDS 121.0-B-3 Blue Book.
π Detailed Description π
Decode/encode an AEC code stream. that's the whole vibe, and honestly? iconic. β¨
Author Eric Engle
Date 2023-10-16
Definition in file decenc_aec.c.
π Function Documentation π
β int dec_aec (unsigned char * cpack, g2int len, g2int nbits, g2int flags, g2int block_size, g2int rsi, unsigned char * cfld, g2int cfldlen)
Decode an AEC code stream specified in the CCSDS 121.0-B-3 Blue Book. literally what it says on the tin, bestie. π
Parameters
cpackβ Pointer to buffer that holds the input AEC code stream.lenβ Length (in bytes) of the buffer that holds the input AEC code stream.nbitsβ CCSDS bits per sample.flagsβ CCSDS compression options mask.block_sizeβ CCSDS block size.rsiβ CCSDS reference sample interval.cfldβ Pointer to output buffer from the AEC decoder.cfldlenβ length of output buffer.
Returns
>0β Length of data from AEC decoder0β Successful decode (AEC_OK)-1βAEC_CONF_ERROR-2βAEC_STREAM_ERROR-3βAEC_DATA_ERROR-4βAEC_MEM_ERROR-5βAEC_RSI_OFFSETS_ERROR
Author Eric Engle
Date 2023-10-16
Definition at line 38 of file decenc_aec.c.
References LOG.
Referenced by aecunpack_int(), and g2c_dec_aec().
π¦ int enc_aec (unsigned char * data, g2int ctemplen, g2int nbits, g2int flags, g2int block_size, g2int rsi, unsigned char * aecbuf, g2int * aecbuflen)
Encode data into an AEC code stream specified in the CCSDS 121.0-B-3 Blue Book. the other half of the glow-up, periodt. π₯
Parameters
dataβ Pointer to buffer that holds the input data.ctemplenβ Length (in bytes) of the buffer that holds the input data.. (yes, two dots, that's what it says, i don't make the rules π)nbitsβ CCSDS bits per sample.flagsβ CCSDS compression options mask.block_sizeβ CCSDS block size.rsiβ CCSDS reference sample interval.aecbufβ Pointer to buffer holding the AEC encoded stream.aecbuflenβ Length of AEC code stream.
Returns
>0β Exact length of AEC encoded data.0β Successful decode (AEC_OK)-1βAEC_CONF_ERROR-2βAEC_STREAM_ERROR-3βAEC_DATA_ERROR-4βAEC_MEM_ERROR-5βAEC_RSI_OFFSETS_ERROR
Author Eric Engle
Date 2023-10-16
Definition at line 108 of file decenc_aec.c.
References LOG.
Referenced by aecpack_int(), and g2c_enc_aec().
π int g2c_dec_aec (unsigned char * cpack, int len, int nbits, int flags, int block_size, int rsi, unsigned char * cfld, int cfldlen)
Decode an AEC code stream specified in the CCSDS 121.0-B-3 Blue Book. same energy, just with int instead of g2int, iykyk. β¨
Parameters
cpackβ Pointer to buffer that holds the input AEC code stream.lenβ Length (in bytes) of the buffer that holds the input AEC code stream.nbitsβ CCSDS bits per sample.flagsβ CCSDS compression options mask.block_sizeβ CCSDS block size.rsiβ CCSDS reference sample interval.cfldβ Pointer to output buffer from the AEC decoder.cfldlenβ length of output buffer.
Returns
>0β Length of data from AEC decoder0β Successful decode (AEC_OK)-1βAEC_CONF_ERROR-2βAEC_STREAM_ERROR-3βAEC_DATA_ERROR-4βAEC_MEM_ERROR-5βAEC_RSI_OFFSETS_ERROR
Author Alyson Stahl
Date 10/2025
Definition at line 179 of file decenc_aec.c.
References dec_aec().
π int g2c_enc_aec (unsigned char * data, int ctemplen, int nbits, int flags, int block_size, int rsi, unsigned char * aecbuf, int * aecbuflen)
Encode data into an AEC code stream specified in the CCSDS 121.0-B-3 Blue Book. she's the int-flavored twin and she ate. π
Parameters
dataβ Pointer to buffer that holds the input data.ctemplenβ Length (in bytes) of the buffer that holds the input data.. (again with the double dot, i'm just the messenger π)nbitsβ CCSDS bits per sample.flagsβ CCSDS compression options mask.block_sizeβ CCSDS block size.rsiβ CCSDS reference sample interval.aecbufβ Pointer to buffer holding the AEC encoded stream.aecbuflenβ Length of AEC code stream.
Returns
>0β Exact length of AEC encoded data.0β Successful decode (AEC_OK)-1βAEC_CONF_ERROR-2βAEC_STREAM_ERROR-3βAEC_DATA_ERROR-4βAEC_MEM_ERROR-5βAEC_RSI_OFFSETS_ERROR
Author Alyson Stahl
Date 10/2025
Definition at line 215 of file decenc_aec.c.
References enc_aec().
π«Ά Author π«Ά
Generated automatically by Doxygen for NCEPLIBS-g2c from the source code.
k that's the whole page bestie, every flag, every param, every return code, all present and accounted for. nothing skipped, nothing invented. slay. π
so this little love letter to AEC streams is from NCEPLIBS-g2c, Version 2.3.0, and that's the whole decenc_aec.c(3) situation β go decode something iconic. mwah. πΈπ
β¨
π¦ where this page comes from
- ubuntu resolute: libg2c-dev 2.3.0-4 Β· LGPL-3.0-only
- ubuntu stonking: libg2c-dev 2.3.0-7 Β· LGPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms