Add a way to determine if a compression codec is supported at runtime
[folly.git] / folly / io / Compression.h
index 3d46d4c5a0b2e91ddea14902769b4986ce6d7a73..78161f315fafa4a129d0ed4e323345433121c8d2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -176,4 +176,9 @@ constexpr int COMPRESSION_LEVEL_BEST = -3;
 std::unique_ptr<Codec> getCodec(CodecType type,
                                 int level = COMPRESSION_LEVEL_DEFAULT);
 
+/**
+ * Check if a specified codec is supported.
+ */
+bool hasCodec(CodecType type);
+
 }}  // namespaces