diff options
Diffstat (limited to 'lib/fstream/compressor.c')
-rw-r--r-- | lib/fstream/compressor.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/fstream/compressor.c b/lib/fstream/compressor.c index b8f9c6b..84a859c 100644 --- a/lib/fstream/compressor.c +++ b/lib/fstream/compressor.c @@ -14,6 +14,9 @@ int fstream_compressor_id_from_name(const char *name) if (strcmp(name, "xz") == 0) return FSTREAM_COMPRESSOR_XZ; + if (strcmp(name, "zstd") == 0) + return FSTREAM_COMPRESSOR_ZSTD; + return -1; } @@ -25,6 +28,9 @@ const char *fstream_compressor_name_from_id(int id) if (id == FSTREAM_COMPRESSOR_XZ) return "xz"; + if (id == FSTREAM_COMPRESSOR_ZSTD) + return "zstd"; + return NULL; } @@ -39,6 +45,10 @@ bool fstream_compressor_exists(int id) case FSTREAM_COMPRESSOR_XZ: return true; #endif +#ifdef WITH_ZSTD + case FSTREAM_COMPRESSOR_ZSTD: + return true; +#endif default: break; } |