diff options
| author | Edward Thomson <ethomson@microsoft.com> | 2013-12-13 18:26:46 -0500 |
|---|---|---|
| committer | Edward Thomson <ethomson@microsoft.com> | 2014-01-14 09:45:12 -0800 |
| commit | c6f26b48e47f6c0cd67769418c33efe66e5b5fe8 (patch) | |
| tree | 2c2057bb8b0b623a77d10c284c019485b65e9bb9 /src/indexer.c | |
| parent | be29dd82e27d3536b9c63f5835b102b28934555e (diff) | |
| download | libgit2-c6f26b48e47f6c0cd67769418c33efe66e5b5fe8.tar.gz | |
Refactor zlib for easier deflate streaming
Diffstat (limited to 'src/indexer.c')
| -rw-r--r-- | src/indexer.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/indexer.c b/src/indexer.c index 6132571cc..ccab8fcf0 100644 --- a/src/indexer.c +++ b/src/indexer.c @@ -5,8 +5,6 @@ * a Linking Exception. For full terms see the included COPYING file. */ -#include <zlib.h> - #include "git2/indexer.h" #include "git2/object.h" @@ -18,7 +16,7 @@ #include "filebuf.h" #include "oid.h" #include "oidmap.h" -#include "compress.h" +#include "zstream.h" #define UINT31_MAX (0x7FFFFFFF) @@ -662,7 +660,7 @@ static int inject_object(git_indexer *idx, git_oid *id) idx->pack->mwf.size += hdr_len; entry->crc = crc32(entry->crc, hdr, hdr_len); - if ((error = git__compress(&buf, data, len)) < 0) + if ((error = git_zstream_deflatebuf(&buf, data, len)) < 0) goto cleanup; /* And then the compressed object */ |
