]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-compression: Add compression level range to handlers
authorAki Tuomi <aki.tuomi@open-xchange.com>
Tue, 30 Mar 2021 16:01:20 +0000 (19:01 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Tue, 13 Apr 2021 06:17:33 +0000 (09:17 +0300)
src/lib-compression/compression.h

index e56ffc0e37f65ef9a2caaf4de8049b682dd858e3..60d58bfb3707fbce2e709e714601a81005cfbe9a 100644 (file)
@@ -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[];