Skip to content

Commit

Permalink
better compression/decompression capability strings
Browse files Browse the repository at this point in the history
  • Loading branch information
calccrypto committed Jun 12, 2024
1 parent c60a2d0 commit d8e4511
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
2 changes: 1 addition & 1 deletion include/dpusm/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ extern const char *DPUSM_COMPRESS_STR[];

typedef dpusm_compress_t dpusm_decompress_t;

extern const char **DPUSM_DECOMPRESS_STR;
extern const char *DPUSM_DECOMPRESS_STR[];

typedef enum {
DPUSM_CHECKSUM_FLETCHER_2 = 1 << 0,
Expand Down
36 changes: 24 additions & 12 deletions src/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,32 @@ const char *DPUSM_OPTIONAL_STR[] = {
};

const char *DPUSM_COMPRESS_STR[] = {
"GZIP Level 1",
"GZIP Level 2",
"GZIP Level 3",
"GZIP Level 4",
"GZIP Level 5",
"GZIP Level 6",
"GZIP Level 7",
"GZIP Level 8",
"GZIP Level 9",
"LZ4",
"ZSTD",
"GZIP Level 1 Compress",
"GZIP Level 2 Compress",
"GZIP Level 3 Compress",
"GZIP Level 4 Compress",
"GZIP Level 5 Compress",
"GZIP Level 6 Compress",
"GZIP Level 7 Compress",
"GZIP Level 8 Compress",
"GZIP Level 9 Compress",
"LZ4 Compress",
"ZSTD Compress",
};

const char **DPUSM_DECOMPRESS_STR = DPUSM_COMPRESS_STR;
const char *DPUSM_DECOMPRESS_STR[] = {
"GZIP Level 1 Decompress",
"GZIP Level 2 Decompress",
"GZIP Level 3 Decompress",
"GZIP Level 4 Decompress",
"GZIP Level 5 Decompress",
"GZIP Level 6 Decompress",
"GZIP Level 7 Decompress",
"GZIP Level 8 Decompress",
"GZIP Level 9 Decompress",
"LZ4 Decompress",
"ZSTD Decompress",
};

const char *DPUSM_CHECKSUM_STR[] = {
"Fletcher 2",
Expand Down

0 comments on commit d8e4511

Please sign in to comment.