1276945Sdim/*- 2276945Sdim * ---------------------------------------------------------------------------- 3276945Sdim * "THE BEER-WARE LICENSE" (Revision 42): 4363496Sdim * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you 5276945Sdim * can do whatever you want with this stuff. If we meet some day, and you think 6276945Sdim * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp 7276945Sdim * ---------------------------------------------------------------------------- 8276945Sdim * 9276945Sdim * $FreeBSD$ 10276945Sdim * 11276945Sdim */ 12276945Sdim#ifndef _SYS_INFLATE_H_ 13276945Sdim#define _SYS_INFLATE_H_ 14276945Sdim 15276945Sdim#if defined(_KERNEL) || defined(KZIP) 16276945Sdim 17276945Sdim#define GZ_EOF -1 18276945Sdim 19276945Sdim#define GZ_WSIZE 0x8000 20276945Sdim 21276945Sdim/* 22276945Sdim * Global variables used by inflate and friends. 23276945Sdim * This structure is used in order to make inflate() reentrant. 24276945Sdim */ 25276945Sdimstruct inflate { 26276945Sdim /* Public part */ 27276945Sdim 28276945Sdim /* This pointer is passed along to the two functions below */ 29276945Sdim void *gz_private; 30276945Sdim 31276945Sdim /* Fetch next character to be uncompressed */ 32276945Sdim int (*gz_input)(void *); 33276945Sdim 34276945Sdim /* Dispose of uncompressed characters */ 35276945Sdim int (*gz_output)(void *, u_char *, u_long); 36363496Sdim 37276945Sdim /* Private part */ 38276945Sdim u_long gz_bb; /* bit buffer */ 39363496Sdim unsigned gz_bk; /* bits in bit buffer */ 40363496Sdim unsigned gz_hufts; /* track memory usage */ 41363496Sdim struct huft *gz_fixed_tl; /* must init to NULL !! */ 42363496Sdim struct huft *gz_fixed_td; 43363496Sdim int gz_fixed_bl; 44363496Sdim int gz_fixed_bd; 45363496Sdim u_char *gz_slide; 46363496Sdim unsigned gz_wp; 47363496Sdim}; 48363496Sdim 49363496Sdimint inflate(struct inflate *); 50363496Sdim 51363496Sdim#endif /* _KERNEL || KZIP */ 52363496Sdim 53363496Sdim#endif /* ! _SYS_INFLATE_H_ */ 54363496Sdim