From 6b905b38bb850d0530ba6f6d02c10b1fb19aef9a Mon Sep 17 00:00:00 2001 From: Alexander Færøy Date: Thu, 20 Apr 2017 16:20:14 +0200 Subject: Add API entry-point for getting compression method version numbers. This patch adds `tor_compress_version_str()` and `tor_compress_header_version_str()` to get the version strings of the different compression schema providers. Both functions returns `NULL` in case a given `compress_method_t` is unknown or unsupported. See: https://bugs.torproject.org/21662 --- src/common/compress.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/common/compress.h') diff --git a/src/common/compress.h b/src/common/compress.h index 87306f5fb9..182530fc11 100644 --- a/src/common/compress.h +++ b/src/common/compress.h @@ -55,6 +55,12 @@ tor_compress_is_compression_bomb(size_t size_in, size_t size_out); int tor_compress_supports_method(compress_method_t method); +const char * +tor_compress_version_str(compress_method_t method); + +const char * +tor_compress_header_version_str(compress_method_t method); + size_t tor_compress_get_total_allocation(void); -- cgit v1.2.3-54-g00ecf