Fix the VKERNEL/VKERNEL64 build.
[dragonfly.git] / sys / sys / inflate.h
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.4 2006/05/20 02:42:13 dillon Exp $
11  *
12  */
13 #ifndef _SYS_INFLATE_H_
14 #define _SYS_INFLATE_H_
15
16 #if defined(_KERNEL) || defined(KZIP)
17
18 #ifndef _SYS_TYPES_H_
19 #include <sys/types.h>
20 #endif
21
22 #define GZ_EOF -1
23
24 #define GZ_WSIZE 0x8000
25
26 /*
27  * Global variables used by inflate and friends.
28  * This structure is used in order to make inflate() reentrant.
29  */
30 struct inflate {
31         /* Public part */
32
33         /* This pointer is passed along to the two functions below */
34         void           *gz_private;
35
36         /* Fetch next character to be uncompressed */
37         int             (*gz_input) (void *);
38
39         /* Dispose of uncompressed characters */
40         int             (*gz_output) (void *, u_char *, u_long);
41
42         /* Private part */
43         u_long          gz_bb;  /* bit buffer */
44         unsigned        gz_bk;  /* bits in bit buffer */
45         unsigned        gz_hufts;       /* track memory usage */
46         struct huft    *gz_fixed_tl;    /* must init to NULL !! */
47         struct huft    *gz_fixed_td;
48         int             gz_fixed_bl;
49         int             gz_fixed_bd;
50         u_char         *gz_slide;
51         unsigned        gz_wp;
52 };
53
54 int inflate     (struct inflate *);
55
56 #endif  /* _KERNEL || KZIP */
57
58 #endif  /* ! _SYS_INFLATE_H_ */