X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=diff.c;h=93ef9a265ca6b52b644468979dba732c70b5097a;hb=66c8448543432308e8fce5e3e04076e875410f67;hp=918c70ca457bcdca54b9d524ff14b60d88b5a631;hpb=9901923cf0994582592a34128a466c58735621fd;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; }