diff options
author | Felix Fietkau <nbd@openwrt.org> | 2006-10-13 22:51:49 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2016-03-20 17:29:15 +0100 |
commit | 60c1f0f64d23003a19a07d6b9638542130f6641d (patch) | |
tree | 8fb2787f4c49baded97cd55e0c371fe1cffce2b6 /target/image/ar7/src/gzip.h | |
parent | d58a09110ccfa95f06c983fe796806f2e035c9d2 (diff) | |
parent | b3ce218b51746d3a576221ea542facf3a1703ab2 (diff) | |
download | mtk-20170518-60c1f0f64d23003a19a07d6b9638542130f6641d.zip mtk-20170518-60c1f0f64d23003a19a07d6b9638542130f6641d.tar.gz mtk-20170518-60c1f0f64d23003a19a07d6b9638542130f6641d.tar.bz2 |
finally move buildroot-ng to trunk
Diffstat (limited to 'target/image/ar7/src/gzip.h')
-rw-r--r-- | target/image/ar7/src/gzip.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/target/image/ar7/src/gzip.h b/target/image/ar7/src/gzip.h new file mode 100644 index 0000000..917e666 --- /dev/null +++ b/target/image/ar7/src/gzip.h @@ -0,0 +1,51 @@ +//bvb#include "timemmap.h" + +#define OF(args) args +#define STATIC static + +#define WSIZE 0x8000 /* Slideing window size (defined as var + * "window" below) must be at least 32k, + * and a power of two. This is the + * data work window used for input buffer + * by the input routine */ + +typedef unsigned char uch; +typedef unsigned short ush; +typedef unsigned long ulg; + + +static char *output_data; +static ulg output_ptr; + +#ifndef NULL +#define NULL 0 +#endif + +#define NOMEMCPY /* Does routine memcpy exist? */ + +//bvb static uch *inbuf; /* input buffer */ +static uch *window; + +//bvb static uch outwin[WSIZE]; + +//bvb static unsigned insize; /* valid bytes in inbuf */ +static unsigned inptr; /* index of next byte to process in inbuf */ + +static unsigned outcnt; /* bytes in output buffer */ + +/* gzip flag byte */ +#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */ +#define CONTINUATION 0x02 /* bit 1 set: continuation of multi-part gzip file */ +#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */ +#define ORIG_NAME 0x08 /* bit 3 set: original file name present */ +#define COMMENT 0x10 /* bit 4 set: file comment present */ +#define ENCRYPTED 0x20 /* bit 5 set: file is encrypted */ +#define RESERVED 0xC0 /* bit 6,7: reserved */ + +/* If BMAX needs to be larger than 16, then h and x[] should be ulg. */ +#define BMAX 16 /* maximum bit length of any code (16 for explode) */ +#define N_MAX 288 /* maximum number of codes in any set */ + +static char *input_data; + +static void *freememstart; |