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
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
21 unsigned long int os_zlib_compress(const char *src, char *dst,
22 unsigned long int src_size,
23 unsigned long int dst_size);
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
33 unsigned long int os_zlib_uncompress(const char *src, char *dst,
34 unsigned long int src_size,
35 unsigned long int dst_size);
37 #endif /* __OS_ZLIB_H */