1 /* Copyright (C) 2009 Trend Micro Inc.
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
17 * @brief Compress a string with zlib.
18 * @param[in] src the source string to compress
19 * @param[out] dst the destination buffer for the compressed string, will be null-terminated on success
20 * @param[in] src_size the length of the source string
21 * @param[in] dst_size the size of the destination buffer
22 * @return 0 on failure, else the length of the compressed string
24 unsigned long int os_zlib_compress(const char *src, char *dst, unsigned long int src_size,
25 unsigned long int dst_size);
28 * @brief Uncompress a string with zlib.
29 * @param[in] src the source string to uncompress
30 * @param[out] dst the destination buffer for the uncompressed string, will be null-terminated on success
31 * @param[in] src_size the length of the source string
32 * @param[in] dst_size the size of the destination buffer
33 * @return 0 on failure, else the length of the uncompressed string
35 unsigned long int os_zlib_uncompress(const char *src, char *dst, unsigned long int src_size,
36 unsigned long int dst_size);
38 #endif /* __OS_ZLIB_H */