1*c2c66affSColin Finck /*************************************************************************** 2*c2c66affSColin Finck * lzx.h - LZX decompression routines * 3*c2c66affSColin Finck * ------------------- * 4*c2c66affSColin Finck * * 5*c2c66affSColin Finck * maintainer: Jed Wing <jedwin@ugcs.caltech.edu> * 6*c2c66affSColin Finck * source: modified lzx.c from cabextract v0.5 * 7*c2c66affSColin Finck * notes: This file was taken from cabextract v0.5, which was, * 8*c2c66affSColin Finck * itself, a modified version of the lzx decompression code * 9*c2c66affSColin Finck * from unlzx. * 10*c2c66affSColin Finck ***************************************************************************/ 11*c2c66affSColin Finck 12*c2c66affSColin Finck /*************************************************************************** 13*c2c66affSColin Finck * 14*c2c66affSColin Finck * Copyright(C) Stuart Caie 15*c2c66affSColin Finck * 16*c2c66affSColin Finck * This library is free software; you can redistribute it and/or 17*c2c66affSColin Finck * modify it under the terms of the GNU Lesser General Public 18*c2c66affSColin Finck * License as published by the Free Software Foundation; either 19*c2c66affSColin Finck * version 2.1 of the License, or (at your option) any later version. 20*c2c66affSColin Finck * 21*c2c66affSColin Finck * This library is distributed in the hope that it will be useful, 22*c2c66affSColin Finck * but WITHOUT ANY WARRANTY; without even the implied warranty of 23*c2c66affSColin Finck * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 24*c2c66affSColin Finck * Lesser General Public License for more details. 25*c2c66affSColin Finck * 26*c2c66affSColin Finck * You should have received a copy of the GNU Lesser General Public 27*c2c66affSColin Finck * License along with this library; if not, write to the Free Software 28*c2c66affSColin Finck * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 29*c2c66affSColin Finck * 30*c2c66affSColin Finck ***************************************************************************/ 31*c2c66affSColin Finck 32*c2c66affSColin Finck #ifndef INCLUDED_LZX_H 33*c2c66affSColin Finck #define INCLUDED_LZX_H 34*c2c66affSColin Finck 35*c2c66affSColin Finck /* return codes */ 36*c2c66affSColin Finck #define DECR_OK (0) 37*c2c66affSColin Finck #define DECR_DATAFORMAT (1) 38*c2c66affSColin Finck #define DECR_ILLEGALDATA (2) 39*c2c66affSColin Finck #define DECR_NOMEMORY (3) 40*c2c66affSColin Finck 41*c2c66affSColin Finck /* opaque state structure */ 42*c2c66affSColin Finck struct LZXstate; 43*c2c66affSColin Finck 44*c2c66affSColin Finck /* create an lzx state object */ 45*c2c66affSColin Finck struct LZXstate *LZXinit(int window); 46*c2c66affSColin Finck 47*c2c66affSColin Finck /* destroy an lzx state object */ 48*c2c66affSColin Finck void LZXteardown(struct LZXstate *pState); 49*c2c66affSColin Finck 50*c2c66affSColin Finck /* reset an lzx stream */ 51*c2c66affSColin Finck int LZXreset(struct LZXstate *pState); 52*c2c66affSColin Finck 53*c2c66affSColin Finck /* decompress an LZX compressed block */ 54*c2c66affSColin Finck int LZXdecompress(struct LZXstate *pState, 55*c2c66affSColin Finck unsigned char *inpos, 56*c2c66affSColin Finck unsigned char *outpos, 57*c2c66affSColin Finck int inlen, 58*c2c66affSColin Finck int outlen); 59*c2c66affSColin Finck 60*c2c66affSColin Finck #endif /* INCLUDED_LZX_H */ 61