1 /* 2 * ---------------------------------------------------------------------------- 3 * "THE BEER-WARE LICENSE" (Revision 42): 4 * <phk@login.dkuug.dk> wrote this file. As long as you retain this notice you 5 * can do whatever you want with this stuff. If we meet some day, and you think 6 * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp 7 * ---------------------------------------------------------------------------- 8 * 9 * $FreeBSD: src/sys/sys/inflate.h,v 1.11 1999/12/29 04:24:42 peter Exp $ 10 * $DragonFly: src/sys/sys/inflate.h,v 1.2 2003/06/17 04:28:58 dillon Exp $ 11 * 12 */ 13 #ifndef _SYS_INFLATE_H_ 14 #define _SYS_INFLATE_H_ 15 16 #if defined(_KERNEL) || defined(KZIP) 17 18 #define GZ_EOF -1 19 20 #define GZ_WSIZE 0x8000 21 22 /* 23 * Global variables used by inflate and friends. 24 * This structure is used in order to make inflate() reentrant. 25 */ 26 struct inflate { 27 /* Public part */ 28 29 /* This pointer is passed along to the two functions below */ 30 void *gz_private; 31 32 /* Fetch next character to be uncompressed */ 33 int (*gz_input) __P((void *)); 34 35 /* Dispose of uncompressed characters */ 36 int (*gz_output) __P((void *, u_char *, u_long)); 37 38 /* Private part */ 39 u_long gz_bb; /* bit buffer */ 40 unsigned gz_bk; /* bits in bit buffer */ 41 unsigned gz_hufts; /* track memory usage */ 42 struct huft *gz_fixed_tl; /* must init to NULL !! */ 43 struct huft *gz_fixed_td; 44 int gz_fixed_bl; 45 int gz_fixed_bd; 46 u_char *gz_slide; 47 unsigned gz_wp; 48 }; 49 50 int inflate __P((struct inflate *)); 51 52 #endif /* _KERNEL || KZIP */ 53 54 #endif /* ! _SYS_INFLATE_H_ */ 55