gzip.h

来自「ADS下的bios工程」· C头文件 代码 · 共 68 行

H
68
字号
/*  * gzip.h -- common declarations for all gzip modules * Copyright (C) 1992-1993 Jean-loup Gailly. * This is free software; you can redistribute it and/or modify it under the * terms of the GNU General Public License, see the file COPYING. *  */#ifndef _BIOS_GZIP_H#define _BIOS_GZIP_H#include <bios/types.h>/* 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 */#ifndef WSIZE#  define WSIZE 0x8000     /* window size--must be a power of two, and */#endif                     /*  at least 32K for zip's deflate method */#define MIN_MATCH  3#define MAX_MATCH  258/* The minimum and maximum match lengths */extern int decrypt;        /* flag to turn on decryption */extern int save_orig_name; /* set if original name must be saved */extern int verbose;        /* be verbose (-v) */extern int level;          /* compression level */extern int test;           /* check .z file integrity */extern int to_stdout;      /* output to stdout (-c) *///#define get_byte()  (inptr < insize ? inbuf[inptr++] : fill_inbuf())#define get_byte()  inbuf[inptr++]/* put_byte is used for the compressed output, put_char for the * uncompressed output. However unlzw() uses window for its * suffix table instead of its output buffer, so it does not use put_char. * (to be cleaned up). *//* Diagnostic functions */#if  DEBUG_BIOS_ZIP#  define Assert(cond,msg) {if(!(cond)) error(msg);}#  define Trace(x) fprintf x#  define Tracev(x) {if (verbose) printf x ;}#  define Tracevv(x) {if (verbose>1) printf x ;}#  define Tracec(c,x) {if (verbose && (c)) printf x ;}#  define Tracex(c,x) {if (c) printf x ;}#  define Tracecv(c,x) {if (verbose>1 && (c)) printf x ;}#else#  define Assert(cond,msg)#  define Trace(x)#  define Tracev(x)#  define Tracevv(x)#  define Tracec(c,x)#  define Tracecv(c,x)#endifextern u32 decompress_kernel(u32 out, u32 in, u32 size); #endif /* _BIOS_GZIP_H */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?