diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-07-19 09:33:03 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-07-19 09:33:04 -0700 |
commit | eb4f4076aa89d38221ee513a5f28f22124029c90 (patch) | |
tree | 8617f31f2dada1ec300dff9427f92ba00ea95500 /http-push.c | |
parent | d37b2991b1edea76c01ec05cc383005b55c96e36 (diff) | |
parent | e01503b523e79748ac91d876f506811c597d03cb (diff) | |
download | git-eb4f4076aa89d38221ee513a5f28f22124029c90.tar.gz |
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 'http-push.c')
-rw-r--r-- | http-push.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/http-push.c b/http-push.c index 28bfe768f7..6e8f6d09ab 100644 --- a/http-push.c +++ b/http-push.c @@ -377,15 +377,15 @@ static void start_put(struct transfer_request *request) unsigned long len; int hdrlen; ssize_t size; - z_stream stream; + git_zstream stream; unpacked = read_sha1_file(request->obj->sha1, &type, &len); hdrlen = sprintf(hdr, "%s %lu", typename(type), len) + 1; /* Set it up */ memset(&stream, 0, sizeof(stream)); - deflateInit(&stream, zlib_compression_level); - size = deflateBound(&stream, len + hdrlen); + git_deflate_init(&stream, zlib_compression_level); + size = git_deflate_bound(&stream, len + hdrlen); strbuf_init(&request->buffer.buf, size); request->buffer.posn = 0; @@ -396,15 +396,15 @@ static void start_put(struct transfer_request *request) /* First header.. */ stream.next_in = (void *)hdr; stream.avail_in = hdrlen; - while (deflate(&stream, 0) == Z_OK) - /* nothing */; + while (git_deflate(&stream, 0) == Z_OK) + ; /* nothing */ /* Then the data itself.. */ stream.next_in = unpacked; stream.avail_in = len; - while (deflate(&stream, Z_FINISH) == Z_OK) - /* nothing */; - deflateEnd(&stream); + while (git_deflate(&stream, Z_FINISH) == Z_OK) + ; /* nothing */ + git_deflate_end(&stream); free(unpacked); request->buffer.buf.len = stream.total_out; |