ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/liblzf/lzf_c.c
(Generate patch)

Comparing liblzf/lzf_c.c (file contents):
Revision 1.12 by root, Tue Jun 19 21:25:01 2007 UTC vs.
Revision 1.13 by root, Tue Jun 19 21:25:07 2007 UTC

48 */ 48 */
49#ifndef FRST 49#ifndef FRST
50# define FRST(p) (((p[0]) << 8) | p[1]) 50# define FRST(p) (((p[0]) << 8) | p[1])
51# define NEXT(v,p) (((v) << 8) | p[2]) 51# define NEXT(v,p) (((v) << 8) | p[2])
52# define IDX(h) ((((h ^ (h << 5)) >> (3*8 - HLOG)) - h*5) & (HSIZE - 1)) 52# define IDX(h) ((((h ^ (h << 5)) >> (3*8 - HLOG)) - h*5) & (HSIZE - 1))
53//# define IDX(h) ((ip[0] * 121 ^ ip[1] * 33 ^ ip[2] * 1) & (HSIZE-1)) 53/*# define IDX(h) ((ip[0] * 121 ^ ip[1] * 33 ^ ip[2] * 1) & (HSIZE-1))*/
54#endif 54#endif
55/* 55/*
56 * IDX works because it is very similar to a multiplicative hash, e.g. 56 * IDX works because it is very similar to a multiplicative hash, e.g.
57 * ((h * 57321 >> (3*8 - HLOG)) & (HSIZE - 1)) 57 * ((h * 57321 >> (3*8 - HLOG)) & (HSIZE - 1))
58 * the latter is also quite fast on newer CPUs, and compresses similarly. 58 * the latter is also quite fast on newer CPUs, and compresses similarly.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines