Commit 243393c90f2b7cb781fd794e22786e9c8547901a
1 parent
021a52ac70
Exists in
master
and in
7 other branches
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.
Showing 1 changed file with 5 additions and 0 deletions Side-by-side Diff
include/linux/zlib.h
... | ... | @@ -506,6 +506,11 @@ |
506 | 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 | 514 | extern int zlib_deflateParams (z_streamp strm, int level, int strategy); |
510 | 515 | /* |
511 | 516 | Dynamically update the compression level and compression strategy. The |