aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-08-06 12:39:57 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-08-06 12:39:57 -0400
commit243393c90f2b7cb781fd794e22786e9c8547901a (patch)
treed97d8f30f59ef99c82cf8a9a6fce3c08768b240c
parent021a52ac70802a94e699badb52af9d0fa728d5cd (diff)
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.
-rw-r--r--include/linux/zlib.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/zlib.h b/include/linux/zlib.h
index 850076ea14d3..74f7b78c22d2 100644
--- a/include/linux/zlib.h
+++ b/include/linux/zlib.h
@@ -506,6 +506,11 @@ extern int zlib_deflateReset (z_streamp strm);
506 stream state was inconsistent (such as zalloc or state being NULL). 506 stream state was inconsistent (such as zalloc or state being NULL).
507*/ 507*/
508 508
509static inline unsigned long deflateBound(unsigned long s)
510{
511 return s + ((s + 7) >> 3) + ((s + 63) >> 6) + 11;
512}
513
509extern int zlib_deflateParams (z_streamp strm, int level, int strategy); 514extern int zlib_deflateParams (z_streamp strm, int level, int strategy);
510/* 515/*
511 Dynamically update the compression level and compression strategy. The 516 Dynamically update the compression level and compression strategy. The