diff options
Diffstat (limited to 'xdelta3/xdelta3-cfgs.h')
-rwxr-xr-x | xdelta3/xdelta3-cfgs.h | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/xdelta3/xdelta3-cfgs.h b/xdelta3/xdelta3-cfgs.h new file mode 100755 index 0000000..329f3e9 --- /dev/null +++ b/xdelta3/xdelta3-cfgs.h | |||
@@ -0,0 +1,118 @@ | |||
1 | /* xdelta 3 - delta compression tools and library | ||
2 | * Copyright (C) 2001 and onward. Joshua P. MacDonald | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | |||
19 | /****************************************************************************************** | ||
20 | SOFT string matcher | ||
21 | ******************************************************************************************/ | ||
22 | |||
23 | #if XD3_BUILD_SOFT | ||
24 | |||
25 | #define TEMPLATE soft | ||
26 | #define LLOOK stream->large_look | ||
27 | #define LSTEP stream->large_step | ||
28 | #define SLOOK stream->small_look | ||
29 | #define SCHAIN stream->small_chain | ||
30 | #define SLCHAIN stream->small_lchain | ||
31 | #define SSMATCH stream->ssmatch | ||
32 | #define TRYLAZY stream->try_lazy | ||
33 | #define MAXLAZY stream->max_lazy | ||
34 | #define LONGENOUGH stream->long_enough | ||
35 | #define PROMOTE stream->promote | ||
36 | |||
37 | #define SOFTCFG 1 | ||
38 | #include "xdelta3.c" | ||
39 | #undef SOFTCFG | ||
40 | |||
41 | #undef TEMPLATE | ||
42 | #undef LLOOK | ||
43 | #undef SLOOK | ||
44 | #undef LSTEP | ||
45 | #undef SCHAIN | ||
46 | #undef SLCHAIN | ||
47 | #undef SSMATCH | ||
48 | #undef TRYLAZY | ||
49 | #undef MAXLAZY | ||
50 | #undef LONGENOUGH | ||
51 | #undef PROMOTE | ||
52 | #endif | ||
53 | |||
54 | #define SOFTCFG 0 | ||
55 | |||
56 | /****************************************************************************************** | ||
57 | FAST string matcher | ||
58 | ******************************************************************************************/ | ||
59 | #if XD3_BUILD_FAST | ||
60 | #define TEMPLATE fast | ||
61 | #define LLOOK 32 | ||
62 | #define LSTEP 32 | ||
63 | #define SLOOK 4 | ||
64 | |||
65 | #define SCHAIN 2 // For testcase/3, this produces miserable performance | ||
66 | #define SLCHAIN 2 // with these values != 1 and large input window size | ||
67 | |||
68 | #define SSMATCH 1 | ||
69 | #define TRYLAZY 0 | ||
70 | #define MAXLAZY 0 | ||
71 | #define LONGENOUGH 64 | ||
72 | #define PROMOTE 0 | ||
73 | |||
74 | #include "xdelta3.c" | ||
75 | |||
76 | #undef TEMPLATE | ||
77 | #undef LLOOK | ||
78 | #undef SLOOK | ||
79 | #undef LSTEP | ||
80 | #undef SCHAIN | ||
81 | #undef SLCHAIN | ||
82 | #undef SSMATCH | ||
83 | #undef TRYLAZY | ||
84 | #undef MAXLAZY | ||
85 | #undef LONGENOUGH | ||
86 | #undef PROMOTE | ||
87 | #endif | ||
88 | |||
89 | /****************************************************************************************** | ||
90 | SLOW string matcher | ||
91 | ******************************************************************************************/ | ||
92 | #if XD3_BUILD_SLOW | ||
93 | #define TEMPLATE slow | ||
94 | #define LLOOK 64 | ||
95 | #define LSTEP 64 // TODO | ||
96 | #define SLOOK 4 | ||
97 | #define SCHAIN 128 | ||
98 | #define SLCHAIN 16 | ||
99 | #define SSMATCH 0 | ||
100 | #define TRYLAZY 1 | ||
101 | #define MAXLAZY 8 | ||
102 | #define LONGENOUGH 128 | ||
103 | #define PROMOTE 0 | ||
104 | |||
105 | #include "xdelta3.c" | ||
106 | |||
107 | #undef TEMPLATE | ||
108 | #undef LLOOK | ||
109 | #undef SLOOK | ||
110 | #undef LSTEP | ||
111 | #undef SCHAIN | ||
112 | #undef SLCHAIN | ||
113 | #undef SSMATCH | ||
114 | #undef TRYLAZY | ||
115 | #undef MAXLAZY | ||
116 | #undef LONGENOUGH | ||
117 | #undef PROMOTE | ||
118 | #endif | ||