/*-------------------------------------------------------------*/
/*--- Public header file for the library. ---*/
/*-------------------------------------------------------------*/
/* ------------------------------------------------------------------
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.8 of 13 July 2019
Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
This program is released under the terms of the license contained
------------------------------------------------------------------ */
#define BZ_SEQUENCE_ERROR (-1)
#define BZ_PARAM_ERROR (-2)
#define BZ_MEM_ERROR (-3)
#define BZ_DATA_ERROR (-4)
#define BZ_DATA_ERROR_MAGIC (-5)
#define BZ_UNEXPECTED_EOF (-7)
#define BZ_OUTBUFF_FULL (-8)
#define BZ_CONFIG_ERROR (-9)
unsigned int total_in_lo32;
unsigned int total_in_hi32;
unsigned int total_out_lo32;
unsigned int total_out_hi32;
void *(*bzalloc)(void *,int,int);
void (*bzfree)(void *,void *);
/* Need a definitition for FILE */
/* windows.h define small to char */
# define BZ_API(func) WINAPI func
# define BZ_EXTERN extern
/* import windows dll dynamically */
# define BZ_API(func) (WINAPI * func)
# define BZ_API(func) func
# define BZ_EXTERN extern
/*-- Core (low-level) library functions --*/
BZ_EXTERN int BZ_API(BZ2_bzCompressInit) (
BZ_EXTERN int BZ_API(BZ2_bzCompress) (
BZ_EXTERN int BZ_API(BZ2_bzCompressEnd) (
BZ_EXTERN int BZ_API(BZ2_bzDecompressInit) (
BZ_EXTERN int BZ_API(BZ2_bzDecompress) (
BZ_EXTERN int BZ_API(BZ2_bzDecompressEnd) (
/*-- High(er) level library functions --*/
#define BZ_MAX_UNUSED 5000
BZ_EXTERN BZFILE* BZ_API(BZ2_bzReadOpen) (
BZ_EXTERN void BZ_API(BZ2_bzReadClose) (
BZ_EXTERN void BZ_API(BZ2_bzReadGetUnused) (
BZ_EXTERN int BZ_API(BZ2_bzRead) (
BZ_EXTERN BZFILE* BZ_API(BZ2_bzWriteOpen) (
BZ_EXTERN void BZ_API(BZ2_bzWrite) (
BZ_EXTERN void BZ_API(BZ2_bzWriteClose) (
BZ_EXTERN void BZ_API(BZ2_bzWriteClose64) (
unsigned int* nbytes_in_lo32,
unsigned int* nbytes_in_hi32,
unsigned int* nbytes_out_lo32,
unsigned int* nbytes_out_hi32
/*-- Utility functions --*/
BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffCompress) (
BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffDecompress) (
Code contributed by Yoshioka Tsuneo (tsuneo@rr.iij4u.or.jp)
to support better zlib compatibility.
This code is not _officially_ part of libbzip2 (yet);
I haven't tested it, documented it, or considered the
threading-safeness of it.
If this code breaks, please contact both Yoshioka and me.
BZ_EXTERN const char * BZ_API(BZ2_bzlibVersion) (
BZ_EXTERN BZFILE * BZ_API(BZ2_bzopen) (
BZ_EXTERN BZFILE * BZ_API(BZ2_bzdopen) (
BZ_EXTERN int BZ_API(BZ2_bzread) (
BZ_EXTERN int BZ_API(BZ2_bzwrite) (
BZ_EXTERN int BZ_API(BZ2_bzflush) (
BZ_EXTERN void BZ_API(BZ2_bzclose) (
BZ_EXTERN const char * BZ_API(BZ2_bzerror) (
/*-------------------------------------------------------------*/
/*-------------------------------------------------------------*/