X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=diff.c;h=93ef9a265ca6b52b644468979dba732c70b5097a;hb=660578d4da9d71fbc1e553c95d18987b40af5f0f;hp=918c70ca457bcdca54b9d524ff14b60d88b5a631;hpb=0e8a23bf1f75fbae5ffff2e3847adb4543d3ae0b;p=git.git diff --git a/diff.c b/diff.c index 918c70ca4..93ef9a265 100644 --- a/diff.c +++ b/diff.c @@ -1861,20 +1861,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; }