From 8b235f2f16a472b8cfc10e8ef1286fcd3331e033 Mon Sep 17 00:00:00 2001 From: yalin wang Date: Wed, 9 Sep 2015 15:39:18 -0700 Subject: zlib_deflate/deftree: remove bi_reverse() Remove bi_reverse() and use generic bitrev32() instead - it should have better performance on some platforms. Signed-off-by: yalin wang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- lib/zlib_deflate/defutil.h | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'lib/zlib_deflate/defutil.h') diff --git a/lib/zlib_deflate/defutil.h b/lib/zlib_deflate/defutil.h index b640b64..a8c3708 100644 --- a/lib/zlib_deflate/defutil.h +++ b/lib/zlib_deflate/defutil.h @@ -293,22 +293,6 @@ void zlib_tr_stored_type_only (deflate_state *); } /* =========================================================================== - * Reverse the first len bits of a code, using straightforward code (a faster - * method would use a table) - * IN assertion: 1 <= len <= 15 - */ -static inline unsigned bi_reverse(unsigned code, /* the value to invert */ - int len) /* its bit length */ -{ - register unsigned res = 0; - do { - res |= code & 1; - code >>= 1, res <<= 1; - } while (--len > 0); - return res >> 1; -} - -/* =========================================================================== * Flush the bit buffer, keeping at most 7 bits in it. */ static inline void bi_flush(deflate_state *s) -- cgit v1.1