summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-08-16 11:23:26 -0700
committerJunio C Hamano <gitster@pobox.com>2011-08-16 11:23:26 -0700
commita35d78c0f483a65ea96c4f0c9a825bf28a386273 (patch)
treea20407fc5fbce3b190a364d10c47d807433ec9a5 /diff.c
parent184cb4d6899a2644b07c11bef71df869a851f525 (diff)
parente01503b523e79748ac91d876f506811c597d03cb (diff)
downloadgit-a35d78c0f483a65ea96c4f0c9a825bf28a386273.tar.gz
Merge branch 'jc/zlib-wrap' into maint
* jc/zlib-wrap: zlib: allow feeding more than 4GB in one go zlib: zlib can only process 4GB at a time zlib: wrap deflateBound() too zlib: wrap deflate side of the API zlib: wrap inflateInit2 used to accept only for gzip format zlib: wrap remaining calls to direct inflate/inflateEnd zlib wrapper: refactor error message formatter
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 5dd9049c7d..9038f190ec 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;
}