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