tree d97d8f30f59ef99c82cf8a9a6fce3c08768b240c
parent 021a52ac70802a94e699badb52af9d0fa728d5cd
author Linus Torvalds <[EMAIL PROTECTED]> Sat, 06 Aug 2005 23:39:57 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Sat, 06 Aug 2005 23:39:57 -0700

Add fakey 'deflateBound()' function to the in-kernel zlib routines

It's not the real deflateBound() in newer zlib libraries, partly because
the upcoming usage of it won't have the "stream" available, so we can't
have the same interfaces anyway.

 include/linux/zlib.h |    5 +++++
 1 files changed, 5 insertions(+)

diff --git a/include/linux/zlib.h b/include/linux/zlib.h
--- a/include/linux/zlib.h
+++ b/include/linux/zlib.h
@@ -506,6 +506,11 @@ extern int zlib_deflateReset (z_streamp 
    stream state was inconsistent (such as zalloc or state being NULL).
 */
 
+static inline unsigned long deflateBound(unsigned long s)
+{
+       return s + ((s + 7) >> 3) + ((s + 63) >> 6) + 11;
+}
+
 extern int zlib_deflateParams (z_streamp strm, int level, int strategy);
 /*
      Dynamically update the compression level and compression strategy.  The
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to