~ubuntu-branches/ubuntu/lucid/kchmviewer/lucid

« back to all changes in this revision

Viewing changes to chmlib/lzx.h

  • Committer: Bazaar Package Importer
  • Author(s): Jose Luis Tallon
  • Date: 2006-06-08 20:08:39 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20060608200839-8b7jodug8yvtj126
Tags: upstream-2.5
ImportĀ upstreamĀ versionĀ 2.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: lzx.h 109 2006-02-04 08:41:34Z gyunaev $ */
 
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
 
30
extern "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 */
 
40
struct LZXstate;
 
41
 
 
42
/* create an lzx state object */
 
43
struct LZXstate *LZXinit(int window);
 
44
 
 
45
/* destroy an lzx state object */
 
46
void LZXteardown(struct LZXstate *pState);
 
47
 
 
48
/* reset an lzx stream */
 
49
int LZXreset(struct LZXstate *pState);
 
50
 
 
51
/* decompress an LZX compressed block */
 
52
int 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 */