diff options
Diffstat (limited to 'lib/zlib_deflate/deflate.c')
-rw-r--r-- | lib/zlib_deflate/deflate.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/lib/zlib_deflate/deflate.c b/lib/zlib_deflate/deflate.c index 1653dd9bb01a..c3e4a2baf835 100644 --- a/lib/zlib_deflate/deflate.c +++ b/lib/zlib_deflate/deflate.c | |||
@@ -164,34 +164,17 @@ static const config configuration_table[10] = { | |||
164 | memset((char *)s->head, 0, (unsigned)(s->hash_size-1)*sizeof(*s->head)); | 164 | memset((char *)s->head, 0, (unsigned)(s->hash_size-1)*sizeof(*s->head)); |
165 | 165 | ||
166 | /* ========================================================================= */ | 166 | /* ========================================================================= */ |
167 | int zlib_deflateInit_( | 167 | int zlib_deflateInit2( |
168 | z_streamp strm, | ||
169 | int level, | ||
170 | const char *version, | ||
171 | int stream_size | ||
172 | ) | ||
173 | { | ||
174 | return zlib_deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, | ||
175 | DEF_MEM_LEVEL, | ||
176 | Z_DEFAULT_STRATEGY, version, stream_size); | ||
177 | /* To do: ignore strm->next_in if we use it as window */ | ||
178 | } | ||
179 | |||
180 | /* ========================================================================= */ | ||
181 | int zlib_deflateInit2_( | ||
182 | z_streamp strm, | 168 | z_streamp strm, |
183 | int level, | 169 | int level, |
184 | int method, | 170 | int method, |
185 | int windowBits, | 171 | int windowBits, |
186 | int memLevel, | 172 | int memLevel, |
187 | int strategy, | 173 | int strategy |
188 | const char *version, | ||
189 | int stream_size | ||
190 | ) | 174 | ) |
191 | { | 175 | { |
192 | deflate_state *s; | 176 | deflate_state *s; |
193 | int noheader = 0; | 177 | int noheader = 0; |
194 | static char* my_version = ZLIB_VERSION; | ||
195 | deflate_workspace *mem; | 178 | deflate_workspace *mem; |
196 | 179 | ||
197 | ush *overlay; | 180 | ush *overlay; |
@@ -199,10 +182,6 @@ int zlib_deflateInit2_( | |||
199 | * output size for (length,distance) codes is <= 24 bits. | 182 | * output size for (length,distance) codes is <= 24 bits. |
200 | */ | 183 | */ |
201 | 184 | ||
202 | if (version == NULL || version[0] != my_version[0] || | ||
203 | stream_size != sizeof(z_stream)) { | ||
204 | return Z_VERSION_ERROR; | ||
205 | } | ||
206 | if (strm == NULL) return Z_STREAM_ERROR; | 185 | if (strm == NULL) return Z_STREAM_ERROR; |
207 | 186 | ||
208 | strm->msg = NULL; | 187 | strm->msg = NULL; |