summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root>2007-06-19 21:25:01 +0000
committerroot <root>2007-06-19 21:25:01 +0000
commit1cc96364da481d481dd5e4e8ee5ef545466a2984 (patch)
tree485298c03cf5ed46c0c0382c23407818bfd791e9
parentb55d251e3ef5cd590f1d36fa30135274355df7a6 (diff)
*** empty log message ***
-rw-r--r--lzf_c.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lzf_c.c b/lzf_c.c
index e22ed08..06326de 100644
--- a/lzf_c.c
+++ b/lzf_c.c
@@ -50,11 +50,12 @@
# define FRST(p) (((p[0]) << 8) | p[1])
# define NEXT(v,p) (((v) << 8) | p[2])
# define IDX(h) ((((h ^ (h << 5)) >> (3*8 - HLOG)) - h*5) & (HSIZE - 1))
+//# define IDX(h) ((ip[0] * 121 ^ ip[1] * 33 ^ ip[2] * 1) & (HSIZE-1))
#endif
/*
* IDX works because it is very similar to a multiplicative hash, e.g.
* ((h * 57321 >> (3*8 - HLOG)) & (HSIZE - 1))
- * the latter is also quite fast on newer CPUs, and sligthly better
+ * the latter is also quite fast on newer CPUs, and compresses similarly.
*
* the next one is also quite good, albeit slow ;)
* (int)(cos(h & 0xffffff) * 1e6)
@@ -69,7 +70,7 @@
#define MAX_LIT (1 << 5)
#define MAX_OFF (1 << 13)
-#define MAX_REF ((1 << 8) + (1 << 3))
+#define MAX_REF ((1 << 8) + (1 << 3))
/*
* compressed format