]>
git.saurik.com Git - apple/xnu.git/blob - bsd/dev/random/YarrowCoreLib/src/comp.h
2 * Copyright (c) 1999, 2000-2001 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
26 Contains: Glue between core prng code to the Zlib library.
28 Written by: Counterpane, Inc.
30 Copyright: (c) 2000 by Apple Computer, Inc., all rights reserved.
32 Change History (most recent first):
34 02/10/99 dpm Created, based on Counterpane source.
39 Header for the compression routines added to the Counterpane PRNG.
42 #ifndef __YARROW_COMP_H__
43 #define __YARROW_COMP_H__
48 * Kernel version does NULL compression....
54 * Shrink this down to almost nothing to simplify kernel port;
55 * with additional hacking on prng.c, this could go away entirely
57 typedef char COMP_CTX
;
59 /* and define some type3s normally picked up from zlib */
60 typedef unsigned char Bytef
;
61 typedef unsigned uInt
;
67 /* Top level compression context */
72 #endif /* YARROW_KERNEL */
74 typedef enum comp_error_status
{
76 COMP_ERR_NULL_POINTER
,
81 /* Exported functions from compress.c */
82 comp_error_status
comp_init(COMP_CTX
* ctx
);
83 comp_error_status
comp_add_data(COMP_CTX
* ctx
,Bytef
* inp
,uInt inplen
);
84 comp_error_status
comp_end(COMP_CTX
* ctx
);
85 comp_error_status
comp_get_ratio(COMP_CTX
* ctx
,float* out
);