View | Details | Raw Unified | Return to bug 104085
Collapse All | Expand All

(-)file_not_specified_in_diff (-2 / +6 lines)
Line  Link Here
 Add fakey 'deflateBound()' function to the in-kernel zlib routines
 Add fakey 'deflateBound()' function to the in-kernel zlib routines
1
 
1
 
2
 It's not the real deflateBound() in newer zlib libraries, partly because
2
 It's not the real deflateBound() in newer zlib libraries, partly because
3
 the upcoming usage of it won't have the "stream" available, so we can't
3
 the upcoming usage of it won't have the "stream" available, so we can't
4
 have the same interfaces anyway.
4
 have the same interfaces anyway.
5
--
5
++ b/include/linux/zlib.h
6
-- a/include/linux/zlib.h
Lines 506-511 extern int zlib_deflateReset (z_streamp Link Here
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
509
static inline unsigned long deflateBound(unsigned long s)
510
{
511
	return s + ((s + 7) >> 3) + ((s + 63) >> 6) + 11;
512
}
513
509
extern int zlib_deflateParams (z_streamp strm, int level, int strategy);
514
extern 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

Return to bug 104085