aboutsummaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-07-19 09:33:03 -0700
committerJunio C Hamano <gitster@pobox.com>2011-07-19 09:33:04 -0700
commiteb4f4076aa89d38221ee513a5f28f22124029c90 (patch)
tree8617f31f2dada1ec300dff9427f92ba00ea95500 /diff.c
parentd37b2991b1edea76c01ec05cc383005b55c96e36 (diff)
parente01503b523e79748ac91d876f506811c597d03cb (diff)
downloadgit-eb4f4076aa89d38221ee513a5f28f22124029c90.tar.gz
git-eb4f4076aa89d38221ee513a5f28f22124029c90.tar.xz
Merge branch 'jc/zlib-wrap'
* 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 Conflicts: sha1_file.c
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 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;
}