1168404Spjd/*
2168404Spjd * CDDL HEADER START
3168404Spjd *
4168404Spjd * The contents of this file are subject to the terms of the
5168404Spjd * Common Development and Distribution License (the "License").
6168404Spjd * You may not use this file except in compliance with the License.
7168404Spjd *
8168404Spjd * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9168404Spjd * or http://www.opensolaris.org/os/licensing.
10168404Spjd * See the License for the specific language governing permissions
11168404Spjd * and limitations under the License.
12168404Spjd *
13168404Spjd * When distributing Covered Code, include this CDDL HEADER in each
14168404Spjd * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15168404Spjd * If applicable, add the following below this CDDL HEADER, with the
16168404Spjd * fields enclosed by brackets "[]" replaced with your own identifying
17168404Spjd * information: Portions Copyright [yyyy] [name of copyright owner]
18168404Spjd *
19168404Spjd * CDDL HEADER END
20168404Spjd */
21168404Spjd
22168404Spjd/*
23168404Spjd * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
24168404Spjd * Use is subject to license terms.
25168404Spjd */
26168404Spjd
27168404Spjd#ifndef	_ZMOD_H
28168404Spjd#define	_ZMOD_H
29168404Spjd
30168404Spjd#pragma ident	"%Z%%M%	%I%	%E% SMI"
31168404Spjd
32168404Spjd#ifdef	__cplusplus
33168404Spjdextern "C" {
34168404Spjd#endif
35168404Spjd
36168404Spjd/*
37168404Spjd * zmod - RFC-1950-compatible decompression routines
38168404Spjd *
39168404Spjd * This file provides the public interfaces to zmod, an in-kernel RFC 1950
40168404Spjd * decompression library.  More information about the implementation of these
41168404Spjd * interfaces can be found in the usr/src/uts/common/zmod/ directory.
42168404Spjd */
43168404Spjd
44168404Spjd#define	Z_OK		0
45168404Spjd#define	Z_STREAM_END	1
46168404Spjd#define	Z_NEED_DICT	2
47168404Spjd#define	Z_ERRNO		(-1)
48168404Spjd#define	Z_STREAM_ERROR	(-2)
49168404Spjd#define	Z_DATA_ERROR	(-3)
50168404Spjd#define	Z_MEM_ERROR	(-4)
51168404Spjd#define	Z_BUF_ERROR	(-5)
52168404Spjd#define	Z_VERSION_ERROR	(-6)
53168404Spjd
54168404Spjd#define	Z_NO_COMPRESSION	0
55168404Spjd#define	Z_BEST_SPEED		1
56168404Spjd#define	Z_BEST_COMPRESSION	9
57168404Spjd#define	Z_DEFAULT_COMPRESSION	(-1)
58168404Spjd
59168404Spjdextern int z_uncompress(void *, size_t *, const void *, size_t);
60168404Spjdextern int z_compress(void *, size_t *, const void *, size_t);
61168404Spjdextern int z_compress_level(void *, size_t *, const void *, size_t, int);
62168404Spjdextern const char *z_strerror(int);
63168404Spjd
64168404Spjd#ifdef	__cplusplus
65168404Spjd}
66168404Spjd#endif
67168404Spjd
68168404Spjd#endif	/* _ZMOD_H */
69