00001 /* $Id: lzx.h,v 1.2 2005/05/05 14:39:34 pohly Exp $ */ 00002 /*************************************************************************** 00003 * lzx.h - LZX decompression routines * 00004 * ------------------- * 00005 * * 00006 * maintainer: Jed Wing <jedwin@ugcs.caltech.edu> * 00007 * source: modified lzx.c from cabextract v0.5 * 00008 * notes: This file was taken from cabextract v0.5, which was, * 00009 * itself, a modified version of the lzx decompression code * 00010 * from unlzx. * 00011 ***************************************************************************/ 00012 00013 /*************************************************************************** 00014 * * 00015 * This program is free software; you can redistribute it and/or modify * 00016 * it under the terms of the GNU General Public License as published by * 00017 * the Free Software Foundation; either version 2 of the License, or * 00018 * (at your option) any later version. Note that an exemption to this * 00019 * license has been granted by Stuart Caie for the purposes of * 00020 * distribution with chmlib. This does not, to the best of my * 00021 * knowledge, constitute a change in the license of this (the LZX) code * 00022 * in general. * 00023 * * 00024 ***************************************************************************/ 00025 00026 #ifndef INCLUDED_LZX_H 00027 #define INCLUDED_LZX_H 00028 00029 #ifdef __cplusplus 00030 extern "C" { 00031 #endif 00032 00033 /* return codes */ 00034 #define DECR_OK (0) 00035 #define DECR_DATAFORMAT (1) 00036 #define DECR_ILLEGALDATA (2) 00037 #define DECR_NOMEMORY (3) 00038 00039 /* opaque state structure */ 00040 struct LZXstate; 00041 00042 /* create an lzx state object */ 00043 struct LZXstate *LZXinit(int window); 00044 00045 /* destroy an lzx state object */ 00046 void LZXteardown(struct LZXstate *pState); 00047 00048 /* reset an lzx stream */ 00049 int LZXreset(struct LZXstate *pState); 00050 00051 /* decompress an LZX compressed block */ 00052 int LZXdecompress(struct LZXstate *pState, 00053 unsigned char *inpos, 00054 unsigned char *outpos, 00055 int inlen, 00056 int outlen); 00057 00058 #ifdef __cplusplus 00059 } 00060 #endif 00061 00062 #endif /* INCLUDED_LZX_H */
1.4.2