summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root>2002-09-05 03:31:00 +0000
committerroot <root>2002-09-05 03:31:00 +0000
commitbbceaa6c2bb778a19e3a35543fe9726a7b88584d (patch)
treefeba85ea0de92262f6a04c21d429dbc52fedcc20
parentdb8367fa234d20d6e8e07901398fd45e23058d7b (diff)
*** empty log message ***
-rw-r--r--Changes6
-rw-r--r--lzfP.h2
-rw-r--r--lzf_c.c6
3 files changed, 9 insertions, 5 deletions
diff --git a/Changes b/Changes
index 28e4318..22049f1 100644
--- a/Changes
+++ b/Changes
@@ -1,4 +1,8 @@
-0.4
+0.5
+ - slightly better compression ratio, almost unmeasurably
+ slower.
+
+0.4 Thu Jun 13 14:11:10 CEST 2002
- typoe fix.
- lzf demo program now properly decompresses small files.
- fix another 64 bit issue, found by Laurent Deniel.
diff --git a/lzfP.h b/lzfP.h
index 43acbe2..ad66b6e 100644
--- a/lzfP.h
+++ b/lzfP.h
@@ -50,7 +50,7 @@
/*
* sacrifice some compression quality in favour of compression speed.
* (roughly 1-2% worse compression for large blocks and
- * 9-10% for small, redundant, blocks and 20% better speed in both cases)
+ * 9-10% for small, redundant, blocks and >>20% better speed in both cases)
* In short: enable this for binary data, disable this for text data.
*/
#ifndef ULTRA_FAST
diff --git a/lzf_c.c b/lzf_c.c
index 97ac814..dd40a27 100644
--- a/lzf_c.c
+++ b/lzf_c.c
@@ -38,7 +38,7 @@
*/
#define FRST(p) (((p[0]) << 8) + p[1])
#define NEXT(v,p) (((v) << 8) + p[2])
-#define IDX(h) ((((h ^ (h << 4)) >> (3*8 - HLOG)) + h*3) & (HSIZE - 1))
+#define IDX(h) ((((h ^ (h << 5)) >> (3*8 - HLOG)) + h*3) & (HSIZE - 1))
/*
* IDX works because it is very similar to a multiplicative hash, e.g.
* (h * 57321 >> (3*8 - HLOG))
@@ -49,8 +49,8 @@
#if 0
/* original lzv-like hash function */
# define FRST(p) (p[0] << 5) ^ p[1]
-# define NEXT(v,p) (v << 5) ^ p[2]
-# define IDX(h) (h) & (HSIZE - 1)
+# define NEXT(v,p) ((v) << 5) ^ p[2]
+# define IDX(h) ((h) & (HSIZE - 1))
#endif
#define MAX_LIT (1 << 5)