… | |
… | |
84 | #ifndef STRICT_ALIGN |
84 | #ifndef STRICT_ALIGN |
85 | # define STRICT_ALIGN !(defined(__i386) || defined (__amd64)) |
85 | # define STRICT_ALIGN !(defined(__i386) || defined (__amd64)) |
86 | #endif |
86 | #endif |
87 | |
87 | |
88 | /* |
88 | /* |
89 | * Use string functions to copy memory. |
|
|
90 | * this is usually a loss, even with glibc's optimized memcpy |
|
|
91 | */ |
|
|
92 | #ifndef USE_MEMCPY |
|
|
93 | # define USE_MEMCPY 0 |
|
|
94 | #endif |
|
|
95 | |
|
|
96 | /* |
|
|
97 | * You may choose to pre-set the hash table (might be faster on some |
89 | * You may choose to pre-set the hash table (might be faster on some |
98 | * modern cpus and large (>>64k) blocks) |
90 | * modern cpus and large (>>64k) blocks, and also makes compression |
|
|
91 | * deterministic/repeatable when the configuration otherwise is the same). |
99 | */ |
92 | */ |
100 | #ifndef INIT_HTAB |
93 | #ifndef INIT_HTAB |
101 | # define INIT_HTAB 0 |
94 | # define INIT_HTAB 0 |
102 | #endif |
95 | #endif |
103 | |
96 | |
… | |
… | |
126 | * detect most corrupted streams. |
119 | * detect most corrupted streams. |
127 | * This check is not normally noticable on modern hardware |
120 | * This check is not normally noticable on modern hardware |
128 | * (<1% slowdown), but might slow down older cpus considerably. |
121 | * (<1% slowdown), but might slow down older cpus considerably. |
129 | */ |
122 | */ |
130 | #ifndef CHECK_INPUT |
123 | #ifndef CHECK_INPUT |
131 | # define CHECK_INPUT 0 |
124 | # define CHECK_INPUT 1 |
132 | #endif |
125 | #endif |
133 | |
126 | |
134 | /*****************************************************************************/ |
127 | /*****************************************************************************/ |
135 | /* nothing should be changed below */ |
128 | /* nothing should be changed below */ |
136 | |
129 | |
… | |
… | |
155 | # if defined(VERY_FAST) |
148 | # if defined(VERY_FAST) |
156 | # undef VERY_FAST |
149 | # undef VERY_FAST |
157 | # endif |
150 | # endif |
158 | #endif |
151 | #endif |
159 | |
152 | |
160 | #if USE_MEMCPY || INIT_HTAB |
153 | #if INIT_HTAB |
161 | # ifdef __cplusplus |
154 | # ifdef __cplusplus |
162 | # include <cstring> |
155 | # include <cstring> |
163 | # else |
156 | # else |
164 | # include <string.h> |
157 | # include <string.h> |
165 | # endif |
158 | # endif |