|
16 | 16 | #endif |
17 | 17 |
|
18 | 18 | #include <zlib.h> |
19 | | - |
20 | | -void git_inflate_init(z_streamp strm); |
21 | | -void git_inflate_init_gzip_only(z_streamp strm); |
22 | | -void git_inflate_end(z_streamp strm); |
23 | | -int git_inflate(z_streamp strm, int flush); |
24 | | - |
25 | | -void git_deflate_init(z_streamp strm, int level); |
26 | | -void git_deflate_init_gzip(z_streamp strm, int level); |
27 | | -void git_deflate_end(z_streamp strm); |
28 | | -int git_deflate_end_gently(z_streamp strm); |
29 | | -int git_deflate(z_streamp strm, int flush); |
30 | | -unsigned long git_deflate_bound(z_streamp, unsigned long); |
| 19 | +typedef struct git_zstream { |
| 20 | + z_stream z; |
| 21 | + unsigned long avail_in; |
| 22 | + unsigned long avail_out; |
| 23 | + unsigned long total_in; |
| 24 | + unsigned long total_out; |
| 25 | + unsigned char *next_in; |
| 26 | + unsigned char *next_out; |
| 27 | +} git_zstream; |
| 28 | + |
| 29 | +void git_inflate_init(git_zstream *); |
| 30 | +void git_inflate_init_gzip_only(git_zstream *); |
| 31 | +void git_inflate_end(git_zstream *); |
| 32 | +int git_inflate(git_zstream *, int flush); |
| 33 | + |
| 34 | +void git_deflate_init(git_zstream *, int level); |
| 35 | +void git_deflate_init_gzip(git_zstream *, int level); |
| 36 | +void git_deflate_end(git_zstream *); |
| 37 | +int git_deflate_end_gently(git_zstream *); |
| 38 | +int git_deflate(git_zstream *, int flush); |
| 39 | +unsigned long git_deflate_bound(git_zstream *, unsigned long); |
31 | 40 |
|
32 | 41 | #if defined(DT_UNKNOWN) && !defined(NO_D_TYPE_IN_DIRENT) |
33 | 42 | #define DTYPE(de) ((de)->d_type) |
@@ -991,7 +1000,7 @@ extern struct packed_git *find_sha1_pack(const unsigned char *sha1, |
991 | 1000 | extern void pack_report(void); |
992 | 1001 | extern int open_pack_index(struct packed_git *); |
993 | 1002 | extern void close_pack_index(struct packed_git *); |
994 | | -extern unsigned char *use_pack(struct packed_git *, struct pack_window **, off_t, unsigned int *); |
| 1003 | +extern unsigned char *use_pack(struct packed_git *, struct pack_window **, off_t, unsigned long *); |
995 | 1004 | extern void close_pack_windows(struct packed_git *); |
996 | 1005 | extern void unuse_pack(struct pack_window **); |
997 | 1006 | extern void free_pack_by_name(const char *); |
|
0 commit comments