summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/diff.c b/diff.c
index 918c70c..93ef9a2 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;
}