new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git] / src / os_zlib / os_zlib.h
1 /* Copyright (C) 2009 Trend Micro Inc.
2  * All rights reserved.
3  *
4  * This program is a free software; you can redistribute it
5  * and/or modify it under the terms of the GNU General Public
6  * License (version 2) as published by the FSF - Free Software
7  * Foundation
8  */
9
10 #ifndef __OS_ZLIB_H
11 #define __OS_ZLIB_H
12
13 /* Compress a string with zlib
14  * src: the source string to compress
15  * dst: the destination buffer for the compressed string, will be
16  *      null-terminated on success
17  * src_size: the length of the source string
18  * dst_size: the size of the destination buffer
19  * Returns 0 on failure, else the length of the compressed string
20  */
21 unsigned long int os_zlib_compress(const char *src, char *dst,
22                                    unsigned long int src_size,
23                                    unsigned long int dst_size);
24
25 /* Uncompress a string with zlib
26  * src: the source string to uncompress
27  * dst: the destination buffer for the uncompressed string, will be
28  *      null-terminated on success
29  * src_size: the length of the source string
30  * dst_size: the size of the destination buffer
31  * Returns 0 on failure, else the length of the uncompressed string
32  */
33 unsigned long int os_zlib_uncompress(const char *src, char *dst,
34                                      unsigned long int src_size,
35                                      unsigned long int dst_size);
36
37 #endif /* __OS_ZLIB_H */
38