summaryrefslogtreecommitdiff
path: root/src/common/compress.h
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@torproject.org>2017-04-20 16:20:14 +0200
committerNick Mathewson <nickm@torproject.org>2017-04-25 08:10:10 -0400
commit6b905b38bb850d0530ba6f6d02c10b1fb19aef9a (patch)
tree554986cb82ac4703d749a9422e475fe5e0ab5c34 /src/common/compress.h
parent1c77d8690caa1ad80b9d9581cac8eddae95e82d1 (diff)
downloadtor-6b905b38bb850d0530ba6f6d02c10b1fb19aef9a.tar.gz
tor-6b905b38bb850d0530ba6f6d02c10b1fb19aef9a.zip
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
Diffstat (limited to 'src/common/compress.h')
-rw-r--r--src/common/compress.h6
1 files changed, 6 insertions, 0 deletions
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);