C code for a CCSDS-123.0 compatible codec