| 173 | } |
| 174 | |
| 175 | void git_deflate_init(git_zstream *strm, int level) |
| 176 | { |
| 177 | int status; |
| 178 | |
| 179 | memset(strm, 0, sizeof(*strm)); |
| 180 | zlib_pre_call(strm); |
| 181 | status = deflateInit(&strm->z, level); |
| 182 | zlib_post_call(strm, status); |
| 183 | if (status == Z_OK) |
| 184 | return; |
| 185 | die("deflateInit: %s (%s)", zerr_to_string(status), |
| 186 | strm->z.msg ? strm->z.msg : "no message"); |
| 187 | } |
| 188 | |
| 189 | static void do_git_deflate_init(git_zstream *strm, int level, int windowBits) |
| 190 | { |