summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/lzx.h
Unidiff
Diffstat (limited to 'noncore/apps/opie-reader/lzx.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/lzx.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/noncore/apps/opie-reader/lzx.h b/noncore/apps/opie-reader/lzx.h
new file mode 100644
index 0000000..4a3dd42
--- a/dev/null
+++ b/noncore/apps/opie-reader/lzx.h
@@ -0,0 +1,62 @@
1/* $Id$ */
2/***************************************************************************
3 * lzx.h - LZX decompression routines *
4 * ------------------- *
5 * *
6 * maintainer: Jed Wing <jedwin@ugcs.caltech.edu> *
7 * source: modified lzx.c from cabextract v0.5 *
8 * notes: This file was taken from cabextract v0.5, which was, *
9 * itself, a modified version of the lzx decompression code *
10 * from unlzx. *
11 ***************************************************************************/
12
13/***************************************************************************
14 * *
15 * This program is free software; you can redistribute it and/or modify *
16 * it under the terms of the GNU General Public License as published by *
17 * the Free Software Foundation; either version 2 of the License, or *
18 * (at your option) any later version. Note that an exemption to this *
19 * license has been granted by Stuart Caie for the purposes of *
20 * distribution with chmlib. This does not, to the best of my *
21 * knowledge, constitute a change in the license of this (the LZX) code *
22 * in general. *
23 * *
24 ***************************************************************************/
25
26#ifndef INCLUDED_LZX_H
27#define INCLUDED_LZX_H
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33/* return codes */
34#define DECR_OK (0)
35#define DECR_DATAFORMAT (1)
36#define DECR_ILLEGALDATA (2)
37#define DECR_NOMEMORY (3)
38
39/* opaque state structure */
40struct LZXstate;
41
42/* create an lzx state object */
43struct LZXstate *LZXinit(int window);
44
45/* destroy an lzx state object */
46void LZXteardown(struct LZXstate *pState);
47
48/* reset an lzx stream */
49int LZXreset(struct LZXstate *pState);
50
51/* decompress an LZX compressed block */
52int LZXdecompress(struct LZXstate *pState,
53 unsigned char *inpos,
54 unsigned char *outpos,
55 int inlen,
56 int outlen);
57
58#ifdef __cplusplus
59}
60#endif
61
62#endif /* INCLUDED_LZX_H */