-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code cleanup / speedup and preparing for LZX.
- Loading branch information
Showing
15 changed files
with
3,000 additions
and
1,985 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#pragma once | ||
|
||
/*************************************************************************** | ||
* lzx.h - LZX decompression routines * | ||
* ------------------- * | ||
* * | ||
* maintainer: Jed Wing <jedwin@ugcs.caltech.edu> * | ||
* source: modified lzx.c from cabextract v0.5 * | ||
* notes: This file was taken from cabextract v0.5, which was, * | ||
* itself, a modified version of the lzx decompression code * | ||
* from unlzx. * | ||
***************************************************************************/ | ||
|
||
/*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. Note that an exemption to this * | ||
* license has been granted by Stuart Caie for the purposes of * | ||
* distribution with chmlib. This does not, to the best of my * | ||
* knowledge, constitute a change in the license of this (the LZX) code * | ||
* in general. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#ifndef INCLUDED_LZX_H | ||
#define INCLUDED_LZX_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
/* return codes */ | ||
#define DECR_OK (0) | ||
#define DECR_DATAFORMAT (1) | ||
#define DECR_ILLEGALDATA (2) | ||
#define DECR_NOMEMORY (3) | ||
|
||
/* opaque state structure */ | ||
struct lzx_state; | ||
|
||
/* create an lzx state object */ | ||
struct lzx_state* lzx_init(int window); | ||
|
||
/* destroy an lzx state object */ | ||
void lzx_teardown(struct lzx_state* pState); | ||
|
||
/* reset an lzx stream */ | ||
void lzx_reset(struct lzx_state* pState); | ||
|
||
/* decompress an LZX compressed block */ | ||
int lzx_decompress(struct lzx_state* pState, unsigned char* inpos, unsigned char* outpos, int inlen, | ||
int outlen); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* INCLUDED_LZX_H */ |
Oops, something went wrong.