Differences From:
File
src/delta.c
part of check-in
[6f1af23ebe]
- Added section numbers to delta format, labels for linking, navigation bar. Added delta encoder description (incomplete, right now only all the trivial parts). Using TeX for formulas, and mimetex for conversion.
by
aku on
2007-08-26 22:22:01.
[view]
To:
File
src/delta.c
part of check-in
[f6b4c6458b]
- Raise the hash chain limit in the delta module from 50 to 250.
by
drh on
2007-09-06 00:47:02.
Also file
src/delta.c
part of check-in
[01e3e3f51e]
- Merge in the delta encoder changes.
by
drh on
2007-09-10 00:43:02.
Also file
src/delta.c
part of check-in
[bbcb6326c9]
- Pulled in the navbar and timeline changes.
by
aku on
2007-09-17 00:58:51.
[view]
@@ -341,13 +341,14 @@
i = 0; /* Trying to match a landmark against zOut[base+i] */
bestCnt = 0;
while( 1 ){
int hv;
+ int limit = 250;
hv = hash_32bit(&h) & (MX_LANDMARK-1);
DEBUG2( printf("LOOKING: %4d [%s]\n", base+i, print16(&zOut[base+i])); )
iBlock = landmark[hv];
- while( iBlock>=0 ){
+ while( iBlock>=0 && (limit--)>0 ){
/*
** The hash window has identified a potential match against
** landmark block iBlock. But we need to investigate further.
**
@@ -405,9 +406,9 @@
/* We have a copy command that does not cause the delta to be larger
** than a literal insert. So add the copy command to the delta.
*/
- if( bestCnt>0 && base+i>=bestOfst+NHASH ){
+ if( bestCnt>0 ){
if( bestLitsz>0 ){
/* Add an insert command before the copy */
putInt(bestLitsz,&zDelta);
*(zDelta++) = ':';