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

Comparing liblzf/lzf_c_best.c (file contents):
Revision 1.2 by root, Mon Dec 10 20:21:28 2012 UTC vs.
Revision 1.3 by root, Sun Jan 11 01:32:04 2015 UTC

70 u8 *op = (u8 *)out_data; 70 u8 *op = (u8 *)out_data;
71 const u8 *in_end = ip + in_len; 71 const u8 *in_end = ip + in_len;
72 u8 *out_end = op + out_len; 72 u8 *out_end = op + out_len;
73 73
74 const u8 *first [1 << (6+8)]; /* most recent occurance of a match */ 74 const u8 *first [1 << (6+8)]; /* most recent occurance of a match */
75 u16 prev [MAX_OFF]; /* how many bytes to go backwards for te next match */ 75 u16 prev [MAX_OFF]; /* how many bytes to go backwards for the next match */
76 76
77 int lit; 77 int lit;
78 78
79 if (!in_len || !out_len) 79 if (!in_len || !out_len)
80 return 0; 80 return 0;
114 best_l = l; 114 best_l = l;
115 } 115 }
116 } 116 }
117 117
118 diff = prev [((unsigned int)p) & (MAX_OFF - 1)]; 118 diff = prev [((unsigned int)p) & (MAX_OFF - 1)];
119 p = diff ? p - diff : (u8 *)diff; 119 p = diff ? p - diff : 0;
120 } 120 }
121 121
122 if (best_l) 122 if (best_l)
123 { 123 {
124 int len = best_l; 124 int len = best_l;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines