VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/4.2/include/extensions/lbxzlib.h@ 17242

Last change on this file since 17242 was 17242, checked in by vboxsync, 16 years ago

Additions/x11/x11include: removed svn:keywords properties from all files under this directory as per SvnKeywords on the wiki. Hopefully this is finally correct

  • Property svn:eol-style set to native
File size: 2.4 KB
Line 
1/* $Xorg: lbxzlib.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
2/*
3 * Copyright 1993 Network Computing Devices
4 *
5 * Permission to use, copy, modify, distribute, and sell this software and its
6 * documentation for any purpose is hereby granted without fee, provided that
7 * the above copyright notice appear in all copies and that both that
8 * copyright notice and this permission notice appear in supporting
9 * documentation, and that the name of NCD. not be used in advertising or
10 * publicity pertaining to distribution of the software without specific,
11 * written prior permission. NCD. makes no representations about the
12 * suitability of this software for any purpose. It is provided "as is"
13 * without express or implied warranty.
14 *
15 * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD.
17 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
19 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
20 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 *
22 * Author: Dale Tonogai, Network Computing Devices
23 */
24
25#ifndef _ZLIB_H_
26#define _ZLIB_H_
27
28#define ZLIB_STRCOMP_OPT "XC-ZLIB"
29#define ZLIB_STRCOMP_OPT_LEN 7
30
31#define ZLIB_PACKET_HDRLEN 2
32#define ZLIB_MAX_DATALEN 0xfff
33#define ZLIB_MAX_PLAIN 270
34#define ZLIB_MAX_OUTLEN (ZLIB_MAX_PLAIN << 1)
35
36#define ZLIB_COMPRESS_FLAG 0x80
37#define ZLIB_DATALEN_MASK 0x0f
38
39#define ZLIB_PUT_PKTHDR(p, len, compflag) \
40 { \
41 (p)[0] = ((unsigned)(len)) >> 8 | ((compflag) ? ZLIB_COMPRESS_FLAG : 0);\
42 (p)[1] = (len) & 0xff; \
43 }
44
45#define ZLIB_GET_DATALEN(p) \
46 ((((unsigned)((p)[0] & ZLIB_DATALEN_MASK)) << 8) | (unsigned)(p)[1])
47
48#define ZLIB_COMPRESSED(p) ((p)[0] & ZLIB_COMPRESS_FLAG)
49
50struct ZlibInfo;
51
52extern void * ZlibInit ( int fd, int level );
53extern void ZlibFree ( struct ZlibInfo *comp );
54extern int ZlibFlush ( int fd );
55extern int ZlibStuffInput ( int fd, unsigned char *buffer, int buflen );
56extern void ZlibCompressOn ( int fd );
57extern void ZlibCompressOff ( int fd );
58extern int ZlibWrite ( int fd, unsigned char *buffer, int buflen );
59extern int ZlibWriteV ( int fd, struct iovec *iov, int iovcnt );
60extern int ZlibRead ( int fd, unsigned char *buffer, int buflen );
61extern int ZlibInputAvail ( int fd );
62
63
64#endif /* _ZLIB_H_ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette