diff options
author | Vicent Martà <vicent@github.com> | 2012-12-07 09:40:21 -0800 |
---|---|---|
committer | Vicent Martà <vicent@github.com> | 2012-12-07 09:40:21 -0800 |
commit | 0249a5032ef6fc27d1f2b974aafdb38ab61f81bc (patch) | |
tree | d0112ff148f31f9385e452375e230f4aab877957 /src/pack.h | |
parent | 2599237363d89f7319bc589830597a06f53b1ea0 (diff) | |
parent | 3908c254aac0532baf5a2f6a96603d946edc0510 (diff) | |
download | libgit2-0249a5032ef6fc27d1f2b974aafdb38ab61f81bc.tar.gz |
Merge pull request #1091 from carlosmn/stream-object
Indexer speedup with large objects
Diffstat (limited to 'src/pack.h')
-rw-r--r-- | src/pack.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/pack.h b/src/pack.h index c1277fdfb..188ea2bbd 100644 --- a/src/pack.h +++ b/src/pack.h @@ -8,6 +8,8 @@ #ifndef INCLUDE_pack_h__ #define INCLUDE_pack_h__ +#include <zlib.h> + #include "git2/oid.h" #include "common.h" @@ -76,6 +78,14 @@ struct git_pack_entry { struct git_pack_file *p; }; +typedef struct git_packfile_stream { + git_off_t curpos; + int done; + z_stream zstream; + struct git_pack_file *p; + git_mwindow *mw; +} git_packfile_stream; + int git_packfile_unpack_header( size_t *size_p, git_otype *type_p, @@ -98,6 +108,10 @@ int packfile_unpack_compressed( size_t size, git_otype type); +int git_packfile_stream_open(git_packfile_stream *obj, struct git_pack_file *p, git_off_t curpos); +ssize_t git_packfile_stream_read(git_packfile_stream *obj, void *buffer, size_t len); +void git_packfile_stream_free(git_packfile_stream *obj); + git_off_t get_delta_base(struct git_pack_file *p, git_mwindow **w_curs, git_off_t *curpos, git_otype type, git_off_t delta_obj_offset); |