|
CCSDS 124.0-B-1 C 1.0.0
CCSDS 124.0-B-1 Lossless Compression
|
CCSDS 124.0-B-1 unified command line interface. More...
Go to the source code of this file.
Functions | |
| static void | print_version (void) |
| Print help message with usage information. | |
| static void | print_help (const char *prog_name) |
| static void | make_decompress_filename (char *output, size_t output_len, const char *input) |
| Create output filename for decompression. | |
| static int | do_compress (const char *input_path, int packet_size, int pt_period, int ft_period, int rt_period, int robustness) |
| Compress a file. | |
| static int | do_decompress (const char *input_path, int packet_size, int robustness) |
| Decompress a file. | |
| int | main (int argc, char **argv) |
| CLI entry point. | |
Variables | |
| static const char * | BANNER |
| ASCII art banner for help output. | |
CCSDS 124.0-B-1 unified command line interface.
Definition in file cli.c.
|
static |
Compress a file.
| [in] | input_path | Input file path. |
| [in] | packet_size | Packet size in bytes. |
| [in] | pt_period | New mask period. |
| [in] | ft_period | Send mask period. |
| [in] | rt_period | Uncompressed period. |
| [in] | robustness | Robustness level (0-7). |
Definition at line 141 of file cli.c.
References ccsds124_compress(), ccsds124_compressor_init(), and CCSDS124_OK.
Referenced by main().
|
static |
Decompress a file.
| [in] | input_path | Compressed input file path. |
| [in] | packet_size | Original packet size in bytes. |
| [in] | robustness | Robustness level (0-7). |
Definition at line 257 of file cli.c.
References ccsds124_decompress(), ccsds124_decompressor_init(), CCSDS124_OK, and make_decompress_filename().
Referenced by main().
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
CLI entry point.
| [in] | argc | Argument count. |
| [in] | argv | Argument vector. |
Definition at line 366 of file cli.c.
References do_compress(), do_decompress(), print_help(), and print_version().
|
static |
Create output filename for decompression.
Removes .pkt extension if present, then appends .depkt.
| [out] | output | Output buffer. |
| [in] | output_len | Buffer size. |
| [in] | input | Input filename. |
Definition at line 110 of file cli.c.
Referenced by do_decompress().
|
static |
Definition at line 60 of file cli.c.
References BANNER, CCSDS124_VERSION_MAJOR, CCSDS124_VERSION_MINOR, and CCSDS124_VERSION_PATCH.
Referenced by main().
|
static |
Print help message with usage information.
| [in] | prog_name | Program name for usage example. |
Definition at line 53 of file cli.c.
References CCSDS124_VERSION_MAJOR, CCSDS124_VERSION_MINOR, and CCSDS124_VERSION_PATCH.
Referenced by main().
|
static |
ASCII art banner for help output.
Provides a unified command-line interface for CCSDS 124.0-B-1 compression and decompression, similar to gzip.
Definition at line 36 of file cli.c.
Referenced by print_help().