lkml.org 
[lkml]   [2000]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] minor opt to lib/inflate.c

This is stolen from gzip-1.3 snapshot.

--
Bartlomiej Zolnierkiewicz
<bkz@linux-ide.org>
--- linux-240t9/lib/inflate.c Sun Mar 26 11:56:19 2000
+++ linux/lib/inflate.c Thu Oct 5 23:22:49 2000
@@ -5,7 +5,7 @@

/*
* Adapted for booting Linux by Hannu Savolainen 1993
- * based on gzip-1.0.3
+ * based on gzip-1.0.3
*
* Nicolas Pitre <nico@cam.org>, 1999/04/14 :
* Little mods for all variable to reside either into rodata or bss segments
@@ -1038,13 +1038,13 @@

for (i = 1; i < 256; i++)
{
- c = 0;
- for (k = i | 256; k != 1; k >>= 1)
- {
+ c = i;
+ /* The idea to initialize the register with the byte instead of
+ * zero was stolen from Haruhiko Okumura's ar002
+ */
+ for (k = 8; k; k--)
c = c & 1 ? (c >> 1) ^ e : c >> 1;
- if (k & 1)
- c ^= e;
- }
+
crc_32_tab[i] = c;
}

@@ -1172,5 +1172,3 @@
}
return 0;
}
-
-
\
 
 \ /
  Last update: 2005-03-22 12:41    [W:0.035 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site