17c478bd9Sstevel@tonic-gate /* 2a0b85df4Sstevel * CDDL HEADER START 3a0b85df4Sstevel * 4a0b85df4Sstevel * The contents of this file are subject to the terms of the 5*c9431fa1Sahl * Common Development and Distribution License (the "License"). 6*c9431fa1Sahl * You may not use this file except in compliance with the License. 7a0b85df4Sstevel * 8a0b85df4Sstevel * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9a0b85df4Sstevel * or http://www.opensolaris.org/os/licensing. 10a0b85df4Sstevel * See the License for the specific language governing permissions 11a0b85df4Sstevel * and limitations under the License. 12a0b85df4Sstevel * 13a0b85df4Sstevel * When distributing Covered Code, include this CDDL HEADER in each 14a0b85df4Sstevel * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15a0b85df4Sstevel * If applicable, add the following below this CDDL HEADER, with the 16a0b85df4Sstevel * fields enclosed by brackets "[]" replaced with your own identifying 17a0b85df4Sstevel * information: Portions Copyright [yyyy] [name of copyright owner] 18a0b85df4Sstevel * 19a0b85df4Sstevel * CDDL HEADER END 20a0b85df4Sstevel */ 21a0b85df4Sstevel 22a0b85df4Sstevel /* 23*c9431fa1Sahl * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate * Use is subject to license terms. 257c478bd9Sstevel@tonic-gate */ 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gate #ifndef _ZMOD_H 287c478bd9Sstevel@tonic-gate #define _ZMOD_H 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gate #ifdef __cplusplus 337c478bd9Sstevel@tonic-gate extern "C" { 347c478bd9Sstevel@tonic-gate #endif 357c478bd9Sstevel@tonic-gate 367c478bd9Sstevel@tonic-gate /* 377c478bd9Sstevel@tonic-gate * zmod - RFC-1950-compatible decompression routines 387c478bd9Sstevel@tonic-gate * 397c478bd9Sstevel@tonic-gate * This file provides the public interfaces to zmod, an in-kernel RFC 1950 407c478bd9Sstevel@tonic-gate * decompression library. More information about the implementation of these 417c478bd9Sstevel@tonic-gate * interfaces can be found in the usr/src/uts/common/zmod/ directory. 427c478bd9Sstevel@tonic-gate */ 437c478bd9Sstevel@tonic-gate 447c478bd9Sstevel@tonic-gate #define Z_OK 0 457c478bd9Sstevel@tonic-gate #define Z_STREAM_END 1 467c478bd9Sstevel@tonic-gate #define Z_NEED_DICT 2 477c478bd9Sstevel@tonic-gate #define Z_ERRNO (-1) 487c478bd9Sstevel@tonic-gate #define Z_STREAM_ERROR (-2) 497c478bd9Sstevel@tonic-gate #define Z_DATA_ERROR (-3) 507c478bd9Sstevel@tonic-gate #define Z_MEM_ERROR (-4) 517c478bd9Sstevel@tonic-gate #define Z_BUF_ERROR (-5) 527c478bd9Sstevel@tonic-gate #define Z_VERSION_ERROR (-6) 537c478bd9Sstevel@tonic-gate 54*c9431fa1Sahl #define Z_NO_COMPRESSION 0 55*c9431fa1Sahl #define Z_BEST_SPEED 1 56*c9431fa1Sahl #define Z_BEST_COMPRESSION 9 57*c9431fa1Sahl #define Z_DEFAULT_COMPRESSION (-1) 58*c9431fa1Sahl 597c478bd9Sstevel@tonic-gate extern int z_uncompress(void *, size_t *, const void *, size_t); 60*c9431fa1Sahl extern int z_compress(void *, size_t *, const void *, size_t); 61*c9431fa1Sahl extern int z_compress_level(void *, size_t *, const void *, size_t, int); 627c478bd9Sstevel@tonic-gate extern const char *z_strerror(int); 637c478bd9Sstevel@tonic-gate 647c478bd9Sstevel@tonic-gate #ifdef __cplusplus 657c478bd9Sstevel@tonic-gate } 667c478bd9Sstevel@tonic-gate #endif 677c478bd9Sstevel@tonic-gate 687c478bd9Sstevel@tonic-gate #endif /* _ZMOD_H */ 69