
We include "compat/zlib.h" in "git-compat-util.h", which is unnecessarily broad given that we only have a small handful of files that use the zlib library. Move the header into "git-zlib.h" instead and adapt users of zlib to include that header. One exception is the reftable library, as we don't want to use the Git-specific wrapper of zlib there, so we include "compat/zlib.h" instead. Furthermore, we move the include into "reftable/system.h" so that users of the library other than Git can wire up zlib themselves. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
31 lines
855 B
C
31 lines
855 B
C
#ifndef GIT_ZLIB_H
|
|
#define GIT_ZLIB_H
|
|
|
|
#include "compat/zlib-compat.h"
|
|
|
|
typedef struct git_zstream {
|
|
z_stream z;
|
|
unsigned long avail_in;
|
|
unsigned long avail_out;
|
|
unsigned long total_in;
|
|
unsigned long total_out;
|
|
unsigned char *next_in;
|
|
unsigned char *next_out;
|
|
} git_zstream;
|
|
|
|
void git_inflate_init(git_zstream *);
|
|
void git_inflate_init_gzip_only(git_zstream *);
|
|
void git_inflate_end(git_zstream *);
|
|
int git_inflate(git_zstream *, int flush);
|
|
|
|
void git_deflate_init(git_zstream *, int level);
|
|
void git_deflate_init_gzip(git_zstream *, int level);
|
|
void git_deflate_init_raw(git_zstream *, int level);
|
|
void git_deflate_end(git_zstream *);
|
|
int git_deflate_abort(git_zstream *);
|
|
int git_deflate_end_gently(git_zstream *);
|
|
int git_deflate(git_zstream *, int flush);
|
|
unsigned long git_deflate_bound(git_zstream *, unsigned long);
|
|
|
|
#endif /* GIT_ZLIB_H */
|