X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=diff.c;h=9038f190ece061696a3290acf8f1e9951e9d0a6c;hb=36612e4daf8b5b5eaf16315aa13c66925f878cd6;hp=5dd9049c7d354110534b2770fbf6cbc8e74e359e;hpb=d5c756e99ed7aa07427295b1011edf4718ea80b0;p=git.git diff --git a/diff.c b/diff.c index 5dd9049c7..9038f190e 100644 --- a/diff.c +++ b/diff.c @@ -1839,20 +1839,20 @@ static unsigned char *deflate_it(char *data, { int bound; unsigned char *deflated; - z_stream stream; + git_zstream stream; memset(&stream, 0, sizeof(stream)); - deflateInit(&stream, zlib_compression_level); - bound = deflateBound(&stream, size); + git_deflate_init(&stream, zlib_compression_level); + bound = git_deflate_bound(&stream, size); deflated = xmalloc(bound); stream.next_out = deflated; stream.avail_out = bound; stream.next_in = (unsigned char *)data; stream.avail_in = size; - while (deflate(&stream, Z_FINISH) == Z_OK) + while (git_deflate(&stream, Z_FINISH) == Z_OK) ; /* nothing */ - deflateEnd(&stream); + git_deflate_end(&stream); *result_size = stream.total_out; return deflated; }