diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-08-12 22:38:25 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-08-12 22:38:25 +0100 |
commit | 8189d621e70b4f38abdc6411c3c4ba890ef023f6 (patch) | |
tree | a07e989007fb5ba78b1d8f64a82ee00e61032b05 /src/libutil/util.h | |
parent | eaddd226401393ff96b1f9505e1b530c59bc5504 (diff) | |
download | rspamd-8189d621e70b4f38abdc6411c3c4ba890ef023f6.tar.gz rspamd-8189d621e70b4f38abdc6411c3c4ba890ef023f6.zip |
[Minor] Make a more universal gzip compress utility
Diffstat (limited to 'src/libutil/util.h')
-rw-r--r-- | src/libutil/util.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libutil/util.h b/src/libutil/util.h index 9f42d6c92..d1d83716e 100644 --- a/src/libutil/util.h +++ b/src/libutil/util.h @@ -510,5 +510,12 @@ guint64 rspamd_tm_to_time (const struct tm *tm, glong tz); #define PTR_ARRAY_FOREACH(ar, i, cur) for ((i) = 0; (ar) != NULL && (i) < (ar)->len && (((cur) = g_ptr_array_index((ar), (i))) || 1); ++(i)) +/** + * Compresses the input string using gzip+zlib. Old string is replaced and freed + * if compressed. If not compressed it is untouched. + * @param in + * @return TRUE if a string has been compressed + */ +gboolean rspamd_fstring_gzip (rspamd_fstring_t **in); #endif |