4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
29 * Wrappers for the old names. For compatibility with Solaris 8.
33 bzCompressInit(bz_stream
*strm
, int blockSize100k
, int verbosity
,
36 return (BZ2_bzCompressInit(strm
, blockSize100k
, verbosity
, workFactor
));
40 bzCompress(bz_stream
*strm
, int action
)
42 return (BZ2_bzCompress(strm
, action
));
46 bzCompressEnd(bz_stream
*strm
)
48 return (BZ2_bzCompressEnd(strm
));
52 bzDecompressInit(bz_stream
*strm
, int verbosity
, int small
)
54 return (BZ2_bzDecompressInit(strm
, verbosity
, small
));
58 bzDecompress(bz_stream
*strm
)
60 return (BZ2_bzDecompress(strm
));
64 bzDecompressEnd(bz_stream
*strm
)
66 return (BZ2_bzDecompressEnd(strm
));
70 bzReadOpen(int *bzerror
, FILE *f
, int verbosity
, int small
, void *unused
,
73 return (BZ2_bzReadOpen(bzerror
, f
, verbosity
, small
, unused
, nUnused
));
77 bzReadClose(int *bzerror
, BZFILE
*b
)
79 BZ2_bzReadClose(bzerror
, b
);
83 bzReadGetUnused(int *bzerror
, BZFILE
*b
, void **unused
, int *nUnused
)
85 BZ2_bzReadGetUnused(bzerror
, b
, unused
, nUnused
);
89 bzRead(int *bzerror
, BZFILE
*b
, void *buf
, int len
)
91 return (BZ2_bzRead(bzerror
, b
, buf
, len
));
95 bzWriteOpen(int *bzerror
, FILE *f
, int blockSize100k
, int verbosity
,
98 return (BZ2_bzWriteOpen(bzerror
, f
, blockSize100k
, verbosity
,
103 bzWrite(int *bzerror
, BZFILE
*b
, void *buf
, int len
)
105 BZ2_bzWrite(bzerror
, b
, buf
, len
);
109 bzWriteClose(int *bzerror
, BZFILE
*b
, int abandon
, unsigned int *nbytes_in
,
110 unsigned int *nbytes_out
)
112 BZ2_bzWriteClose(bzerror
, b
, abandon
, nbytes_in
, nbytes_out
);
116 bzBuffToBuffCompress(char *dest
, unsigned int *destLen
, char *source
,
117 unsigned int sourceLen
, int blockSize100k
, int verbosity
, int workFactor
)
119 return (BZ2_bzBuffToBuffCompress(dest
, destLen
, source
, sourceLen
,
120 blockSize100k
, verbosity
, workFactor
));
124 bzBuffToBuffDecompress(char *dest
, unsigned int *destLen
, char *source
,
125 unsigned int sourceLen
, int small
, int verbosity
)
127 return (BZ2_bzBuffToBuffDecompress(dest
, destLen
, source
, sourceLen
,
135 return (BZ2_bzlibVersion());
139 bzopen(const char *path
, const char *mode
)
141 return (BZ2_bzopen(path
, mode
));
145 bzdopen(int fd
, const char *mode
)
147 return (BZ2_bzdopen(fd
, mode
));
151 bzread(BZFILE
*b
, void *buf
, int len
)
153 return (BZ2_bzread(b
, buf
, len
));
157 bzwrite(BZFILE
*b
, void *buf
, int len
)
159 return (BZ2_bzwrite(b
, buf
, len
));
165 return (BZ2_bzflush(b
));
175 bzerror(BZFILE
*b
, int *errnum
)
177 return (BZ2_bzerror(b
, errnum
));