-
Notifications
You must be signed in to change notification settings - Fork 1
/
gz.h
executable file
·29 lines (25 loc) · 1.09 KB
/
gz.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <zlib.h>
//#include "syscall.h"
#include "main.h"
#define OS_CODE 0x03 /* assume Unix */
typedef struct gz_stream {
z_stream stream;
int z_err; /* error code for last stream operation */
int z_eof; /* set if end of input file */
FILE *file; /* .gz file */
Byte *inbuf; /* input buffer */
Byte *outbuf; /* output buffer */
uLong crc; /* crc32 of uncompressed data */
char *msg; /* error message */
char *path; /* path name for debugging only */
int transparent; /* 1 if input file is not a .gz file */
char mode; /* 'w' or 'r' */
z_off_t start; /* start of compressed data in file (header skipped) */
z_off_t in; /* bytes into deflate or inflate */
z_off_t out; /* bytes out of deflate or inflate */
int back; /* one character push-back */
int last; /* true if push-back is last character */
char orig_name[256];
} gz_stream;
int gzGetOrigName(const char *path, char *out, gzFile fd);
int gzCreate(int fd, unsigned char *inbuf, u32 inlen);