From 6b3ba169802394fc1b96fb9ab5c27e03e7d8dff5 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 2 Jun 2025 18:19:10 +0300 Subject: [PATCH] lib-compression: Add o_stream_create_deflate() --- src/lib-compression/ostream-zlib.c | 5 +++++ src/lib-compression/ostream-zlib.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/lib-compression/ostream-zlib.c b/src/lib-compression/ostream-zlib.c index a82750b772..1367713e68 100644 --- a/src/lib-compression/ostream-zlib.c +++ b/src/lib-compression/ostream-zlib.c @@ -441,3 +441,8 @@ struct ostream *o_stream_create_deflate_auto(struct ostream *output, struct even { return o_stream_create_zlib_auto(output, event, FALSE); } + +struct ostream *o_stream_create_deflate(struct ostream *output, int level) +{ + return o_stream_create_zlib(output, level, FALSE); +} diff --git a/src/lib-compression/ostream-zlib.h b/src/lib-compression/ostream-zlib.h index 9738e36cc0..3516cc4fdd 100644 --- a/src/lib-compression/ostream-zlib.h +++ b/src/lib-compression/ostream-zlib.h @@ -3,6 +3,7 @@ struct ostream *o_stream_create_gz_auto(struct ostream *output, struct event *event); struct ostream *o_stream_create_deflate_auto(struct ostream *output, struct event *event); +struct ostream *o_stream_create_deflate(struct ostream *output, int level); struct ostream *o_stream_create_bz2_auto(struct ostream *output, struct event *event); struct ostream *o_stream_create_lz4_auto(struct ostream *output, struct event *event); struct ostream *o_stream_create_zstd_auto(struct ostream *output, struct event *event); -- 2.47.3