xref: /onnv-gate/usr/src/uts/common/sys/zmod.h (revision 3886:3291401d66a6)
1420Sstevel /*
2420Sstevel  * CDDL HEADER START
3420Sstevel  *
4420Sstevel  * The contents of this file are subject to the terms of the
5*3886Sahl  * Common Development and Distribution License (the "License").
6*3886Sahl  * You may not use this file except in compliance with the License.
7420Sstevel  *
8420Sstevel  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9420Sstevel  * or http://www.opensolaris.org/os/licensing.
10420Sstevel  * See the License for the specific language governing permissions
11420Sstevel  * and limitations under the License.
12420Sstevel  *
13420Sstevel  * When distributing Covered Code, include this CDDL HEADER in each
14420Sstevel  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15420Sstevel  * If applicable, add the following below this CDDL HEADER, with the
16420Sstevel  * fields enclosed by brackets "[]" replaced with your own identifying
17420Sstevel  * information: Portions Copyright [yyyy] [name of copyright owner]
18420Sstevel  *
19420Sstevel  * CDDL HEADER END
20420Sstevel  */
21420Sstevel 
220Sstevel@tonic-gate /*
23*3886Sahl  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
240Sstevel@tonic-gate  * Use is subject to license terms.
250Sstevel@tonic-gate  */
260Sstevel@tonic-gate 
270Sstevel@tonic-gate #ifndef	_ZMOD_H
280Sstevel@tonic-gate #define	_ZMOD_H
290Sstevel@tonic-gate 
300Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
310Sstevel@tonic-gate 
320Sstevel@tonic-gate #ifdef	__cplusplus
330Sstevel@tonic-gate extern "C" {
340Sstevel@tonic-gate #endif
350Sstevel@tonic-gate 
360Sstevel@tonic-gate /*
370Sstevel@tonic-gate  * zmod - RFC-1950-compatible decompression routines
380Sstevel@tonic-gate  *
390Sstevel@tonic-gate  * This file provides the public interfaces to zmod, an in-kernel RFC 1950
400Sstevel@tonic-gate  * decompression library.  More information about the implementation of these
410Sstevel@tonic-gate  * interfaces can be found in the usr/src/uts/common/zmod/ directory.
420Sstevel@tonic-gate  */
430Sstevel@tonic-gate 
440Sstevel@tonic-gate #define	Z_OK		0
450Sstevel@tonic-gate #define	Z_STREAM_END	1
460Sstevel@tonic-gate #define	Z_NEED_DICT	2
470Sstevel@tonic-gate #define	Z_ERRNO		(-1)
480Sstevel@tonic-gate #define	Z_STREAM_ERROR	(-2)
490Sstevel@tonic-gate #define	Z_DATA_ERROR	(-3)
500Sstevel@tonic-gate #define	Z_MEM_ERROR	(-4)
510Sstevel@tonic-gate #define	Z_BUF_ERROR	(-5)
520Sstevel@tonic-gate #define	Z_VERSION_ERROR	(-6)
530Sstevel@tonic-gate 
54*3886Sahl #define	Z_NO_COMPRESSION	0
55*3886Sahl #define	Z_BEST_SPEED		1
56*3886Sahl #define	Z_BEST_COMPRESSION	9
57*3886Sahl #define	Z_DEFAULT_COMPRESSION	(-1)
58*3886Sahl 
590Sstevel@tonic-gate extern int z_uncompress(void *, size_t *, const void *, size_t);
60*3886Sahl extern int z_compress(void *, size_t *, const void *, size_t);
61*3886Sahl extern int z_compress_level(void *, size_t *, const void *, size_t, int);
620Sstevel@tonic-gate extern const char *z_strerror(int);
630Sstevel@tonic-gate 
640Sstevel@tonic-gate #ifdef	__cplusplus
650Sstevel@tonic-gate }
660Sstevel@tonic-gate #endif
670Sstevel@tonic-gate 
680Sstevel@tonic-gate #endif	/* _ZMOD_H */
69