diff options
Diffstat (limited to 'src/common/compress_zstd.c')
-rw-r--r-- | src/common/compress_zstd.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/common/compress_zstd.c b/src/common/compress_zstd.c index e2eb292d5d..dca4dbdab5 100644 --- a/src/common/compress_zstd.c +++ b/src/common/compress_zstd.c @@ -26,6 +26,17 @@ /** Total number of bytes allocated for Zstandard state. */ static size_t total_zstd_allocation = 0; +/** Return 1 if Zstandard compression is supported; otherwise 0. */ +int +tor_zstd_method_supported(void) +{ +#ifdef HAVE_ZSTD + return 1; +#else + return 0; +#endif +} + /** Return a string representation of the version of the currently running * version of libzstd. */ const char * |