X-Git-Url: http://ftp.carnet.hr/pub/carnet-debian/scm?a=blobdiff_plain;f=src%2Fos_zlib%2Fos_zlib.h;h=24b992f0c46fd6fb7b6d4d15f2f9e90083d22f30;hb=e81e4e82e5115bf99b6fbd9ebd486de325d67ed6;hp=1f84568ec23938dfae10e1357d1d20731cbb12cd;hpb=914feba5d54f979cd5d7e69c349c3d01f630042a;p=ossec-hids.git diff --git a/src/os_zlib/os_zlib.h b/src/os_zlib/os_zlib.h index 1f84568..24b992f 100755 --- a/src/os_zlib/os_zlib.h +++ b/src/os_zlib/os_zlib.h @@ -1,26 +1,40 @@ -/* @(#) $Id: os_zlib.h,v 1.5 2009/06/24 18:53:06 dcid Exp $ */ - /* Copyright (C) 2009 Trend Micro Inc. * All rights reserved. * * This program is a free software; you can redistribute it * and/or modify it under the terms of the GNU General Public - * License (version 3) as published by the FSF - Free Software + * License (version 2) as published by the FSF - Free Software * Foundation */ - + #ifndef __OS_ZLIB_H #define __OS_ZLIB_H #include "zlib.h" -/* os_compress: Compress a string with zlib. */ -int os_compress(char *src, char *dst, int src_size, int dst_size); +/** + * @brief Compress a string with zlib. + * @param[in] src the source string to compress + * @param[out] dst the destination buffer for the compressed string, will be null-terminated on success + * @param[in] src_size the length of the source string + * @param[in] dst_size the size of the destination buffer + * @return 0 on failure, else the length of the compressed string + */ +unsigned long int os_zlib_compress(const char *src, char *dst, unsigned long int src_size, + unsigned long int dst_size); -/* os_uncompress: Uncompress a string with zlib. */ -int os_uncompress(char *src, char *dst, int src_size, int dst_size); +/** + * @brief Uncompress a string with zlib. + * @param[in] src the source string to uncompress + * @param[out] dst the destination buffer for the uncompressed string, will be null-terminated on success + * @param[in] src_size the length of the source string + * @param[in] dst_size the size of the destination buffer + * @return 0 on failure, else the length of the uncompressed string + */ +unsigned long int os_zlib_uncompress(const char *src, char *dst, unsigned long int src_size, + unsigned long int dst_size); -#endif +#endif /* __OS_ZLIB_H */ /* EOF */