From: Aki Tuomi Date: Tue, 30 Mar 2021 16:01:20 +0000 (+0300) Subject: lib-compression: Add compression level range to handlers X-Git-Tag: 2.3.15~113 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=250a7ea9dbb42f5b615d4fc504c24c31a7756271;p=thirdparty%2Fdovecot%2Fcore.git lib-compression: Add compression level range to handlers --- diff --git a/src/lib-compression/compression.h b/src/lib-compression/compression.h index e56ffc0e37..60d58bfb37 100644 --- a/src/lib-compression/compression.h +++ b/src/lib-compression/compression.h @@ -18,6 +18,13 @@ struct compression_handler { bool (*is_compressed)(struct istream *input); struct istream *(*create_istream)(struct istream *input); struct ostream *(*create_ostream)(struct ostream *output, int level); + /* returns minimum level */ + int (*get_min_level)(void); + /* the default can be -1 (e.g. gz), so the return value of this has to + be used as-is. */ + int (*get_default_level)(void); + /* returns maximum level */ + int (*get_max_level)(void); }; extern const struct compression_handler compression_handlers[];