deflate.h revision 1.1 1 1.1 jonathan /* $NetBSD: deflate.h,v 1.1 2003/07/25 21:12:46 jonathan Exp $ */
2 1.1 jonathan /* $FreeBSD: src/sys/opencrypto/deflate.h,v 1.1.2.1 2002/11/21 23:34:23 sam Exp $ */
3 1.1 jonathan /* $OpenBSD: deflate.h,v 1.3 2002/03/14 01:26:51 millert Exp $ */
4 1.1 jonathan
5 1.1 jonathan /*
6 1.1 jonathan * Copyright (c) 2001 Jean-Jacques Bernard-Gundol (jj (at) wabbitt.org)
7 1.1 jonathan *
8 1.1 jonathan * Redistribution and use in source and binary forms, with or without
9 1.1 jonathan * modification, are permitted provided that the following conditions
10 1.1 jonathan * are met:
11 1.1 jonathan *
12 1.1 jonathan * 1. Redistributions of source code must retain the above copyright
13 1.1 jonathan * notice, this list of conditions and the following disclaimer.
14 1.1 jonathan * 2. Redistributions in binary form must reproduce the above copyright
15 1.1 jonathan * notice, this list of conditions and the following disclaimer in the
16 1.1 jonathan * documentation and/or other materials provided with the distribution.
17 1.1 jonathan * 3. The name of the author may not be used to endorse or promote products
18 1.1 jonathan * derived from this software without specific prior written permission.
19 1.1 jonathan *
20 1.1 jonathan * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21 1.1 jonathan * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22 1.1 jonathan * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23 1.1 jonathan * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 1.1 jonathan * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 1.1 jonathan * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 1.1 jonathan * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 1.1 jonathan * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 1.1 jonathan * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 1.1 jonathan * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 1.1 jonathan */
31 1.1 jonathan
32 1.1 jonathan /*
33 1.1 jonathan * Definition for the wrapper around the deflate compression
34 1.1 jonathan * algorithm used in /sys/crypto
35 1.1 jonathan */
36 1.1 jonathan
37 1.1 jonathan #ifndef _CRYPTO_DEFLATE_H_
38 1.1 jonathan #define _CRYPTO_DEFLATE_H_
39 1.1 jonathan
40 1.1 jonathan #include <net/zlib.h>
41 1.1 jonathan
42 1.1 jonathan #define Z_METHOD 8
43 1.1 jonathan #define Z_MEMLEVEL 8
44 1.1 jonathan #define MINCOMP 2 /* won't be used, but must be defined */
45 1.1 jonathan #define ZBUF 10
46 1.1 jonathan
47 1.1 jonathan u_int32_t deflate_global(u_int8_t *, u_int32_t, int, u_int8_t **);
48 1.1 jonathan void *z_alloc(void *, u_int, u_int);
49 1.1 jonathan void z_free(void *, void *);
50 1.1 jonathan
51 1.1 jonathan struct deflate_buf {
52 1.1 jonathan u_int8_t *out;
53 1.1 jonathan u_int32_t size;
54 1.1 jonathan int flag;
55 1.1 jonathan };
56 1.1 jonathan
57 1.1 jonathan #endif /* _CRYPTO_DEFLATE_H_ */
58