61N/A/*
61N/A * CDDL HEADER START
61N/A *
61N/A * The contents of this file are subject to the terms of the
61N/A * Common Development and Distribution License (the "License").
61N/A * You may not use this file except in compliance with the License.
61N/A *
61N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
61N/A * or http://www.opensolaris.org/os/licensing.
61N/A * See the License for the specific language governing permissions
61N/A * and limitations under the License.
61N/A *
61N/A * When distributing Covered Code, include this CDDL HEADER in each
61N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
61N/A * If applicable, add the following below this CDDL HEADER, with the
61N/A * fields enclosed by brackets "[]" replaced with your own identifying
61N/A * information: Portions Copyright [yyyy] [name of copyright owner]
61N/A *
61N/A * CDDL HEADER END
61N/A */
61N/A
61N/A/*
61N/A * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
61N/A */
61N/A
61N/A/* LINTLIBRARY */
61N/A/* PROTOLIB1 */
61N/A
61N/A#include <stdlib.h>
61N/A#include <stdio.h>
61N/A#include <stdarg.h>
61N/A#include <bzlib.h>
61N/A
61N/A/*
61N/A * usr/src/cmd/bzip2
61N/A */
61N/A
61N/A/*-- Core (low-level) library functions --*/
61N/A
61N/Aextern int BZ2_bzCompressInit(bz_stream *strm, int blockSize100k, int verbosity,
61N/A int workFactor);
61N/Aextern int BZ2_bzCompress(bz_stream *strm, int action);
61N/Aextern int BZ2_bzCompressEnd(bz_stream *strm);
61N/Aextern int BZ2_bzDecompressInit(bz_stream *strm, int verbosity, int small);
61N/Aextern int BZ2_bzDecompress(bz_stream *strm);
61N/Aextern int BZ2_bzDecompressEnd(bz_stream *strm);
61N/Aextern BZFILE *BZ2_bzReadOpen(int *bzerror, FILE *f, int verbosity, int small,
61N/A void *unused, int nUnused);
61N/Aextern void BZ2_bzReadClose(int *bzerror, BZFILE *b);
61N/Aextern void BZ2_bzReadGetUnused(int *bzerror, BZFILE *b, void **unused,
61N/A int *nUnused);
61N/Aextern int BZ2_bzRead(int *bzerror, BZFILE *b, void *buf, int len);
61N/Aextern BZFILE *BZ2_bzWriteOpen(int *bzerror, FILE *f, int blockSize100k,
61N/A int verbosity, int workFactor);
61N/Aextern void BZ2_bzWrite(int *bzerror, BZFILE *b, void *buf, int len);
61N/Aextern void BZ2_bzWriteClose(int *bzerror, BZFILE *b, int abandon,
61N/A unsigned int *nbytes_in, unsigned int *nbytes_out);
61N/Aextern void BZ2_bzWriteClose64(int *bzerror, BZFILE *b, int abandon,
61N/A unsigned int *nbytes_in_lo32, unsigned int *nbytes_in_hi32,
61N/A unsigned int *nbytes_out_lo32, unsigned int *nbytes_out_hi32);
61N/Aextern int BZ2_bzBuffToBuffCompress(char *dest, unsigned int *destLen,
61N/A char *source, unsigned int sourceLen, int blockSize100k, int verbosity,
61N/A int workFactor);
61N/Aextern int BZ2_bzBuffToBuffDecompress(char *dest, unsigned int *destLen,
61N/A char *source, unsigned int sourceLen, int small, int verbosity);
61N/Aextern const char *BZ2_bzlibVersion(void);
61N/Aextern BZFILE *BZ2_bzopen(const char *path, const char *mode);
61N/Aextern BZFILE *BZ2_bzdopen(int fd, const char *mode);
61N/Aextern int BZ2_bzread(BZFILE *b, void *buf, int len);
61N/Aextern int BZ2_bzwrite(BZFILE *b, void *buf, int len);
61N/Aextern int BZ2_bzflush(BZFILE *b);
61N/Aextern void BZ2_bzclose(BZFILE *b);
61N/Aextern const char *BZ2_bzerror(BZFILE *b, int *errnum);