diff options
author | Vicent Marti <tanoku@gmail.com> | 2010-12-06 23:03:16 +0200 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2010-12-06 23:03:16 +0200 |
commit | 44908fe763b1a2097b65c86130ac679c458df7d2 (patch) | |
tree | d4b2e597ec985cabff2236895c4515100a5063e4 /src/git2/zlib.h | |
parent | d12299fe22e549a20e632668fdbe13cab9def9df (diff) | |
download | libgit2-44908fe763b1a2097b65c86130ac679c458df7d2.tar.gz |
Change the library include file
Libgit2 is now officially include as
#include "<git2.h>"
or indidividual files may be included as
#include <git2/index.h>
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'src/git2/zlib.h')
-rw-r--r-- | src/git2/zlib.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/git2/zlib.h b/src/git2/zlib.h new file mode 100644 index 000000000..b68db9bc1 --- /dev/null +++ b/src/git2/zlib.h @@ -0,0 +1,34 @@ +#ifndef INCLUDE_git_zlib_h__ +#define INCLUDE_git_zlib_h__ + +#include <zlib.h> + +/** + * @file git/zlib.h + * @brief Git data compression routines + * @defgroup git_zlib Git data compression routines + * @ingroup Git + * @{ + */ +GIT_BEGIN_DECL + +#if defined(NO_DEFLATE_BOUND) || ZLIB_VERNUM < 0x1200 +/** + * deflateBound returns an upper bound on the compressed size. + * + * This is a stub function used when zlib does not supply the + * deflateBound() implementation itself. + * + * @param stream the stream pointer. + * @param s total length of the source data (in bytes). + * @return maximum length of the compressed data. + */ +GIT_INLINE(size_t) deflateBound(z_streamp stream, size_t s) +{ + return (s + ((s + 7) >> 3) + ((s + 63) >> 6) + 11); +} +#endif + +/** @} */ +GIT_END_DECL +#endif |