summaryrefslogtreecommitdiff
path: root/lib/fstream/compressor.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/fstream/compressor.c')
-rw-r--r--lib/fstream/compressor.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/fstream/compressor.c b/lib/fstream/compressor.c
index 84a859c..903a5f7 100644
--- a/lib/fstream/compressor.c
+++ b/lib/fstream/compressor.c
@@ -17,6 +17,9 @@ int fstream_compressor_id_from_name(const char *name)
if (strcmp(name, "zstd") == 0)
return FSTREAM_COMPRESSOR_ZSTD;
+ if (strcmp(name, "bzip2") == 0)
+ return FSTREAM_COMPRESSOR_BZIP2;
+
return -1;
}
@@ -31,6 +34,9 @@ const char *fstream_compressor_name_from_id(int id)
if (id == FSTREAM_COMPRESSOR_ZSTD)
return "zstd";
+ if (id == FSTREAM_COMPRESSOR_BZIP2)
+ return "bzip2";
+
return NULL;
}
@@ -49,6 +55,10 @@ bool fstream_compressor_exists(int id)
case FSTREAM_COMPRESSOR_ZSTD:
return true;
#endif
+#ifdef WITH_BZIP2
+ case FSTREAM_COMPRESSOR_BZIP2:
+ return true;
+#endif
default:
break;
}