diff options
| author | John Wilbert M. Villamor <lameguy64@gmail.com> | 2019-04-06 10:11:07 +0800 |
|---|---|---|
| committer | John Wilbert M. Villamor <lameguy64@gmail.com> | 2019-04-06 10:11:07 +0800 |
| commit | f3e040230772f978540a71aea43dfde200992922 (patch) | |
| tree | bd8ca31b72dd01e24980b073854e263589530f56 /tools/lzpack/lzp/lzconfig.h | |
| download | psn00bsdk-f3e040230772f978540a71aea43dfde200992922.tar.gz | |
First commit
Diffstat (limited to 'tools/lzpack/lzp/lzconfig.h')
| -rw-r--r-- | tools/lzpack/lzp/lzconfig.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/tools/lzpack/lzp/lzconfig.h b/tools/lzpack/lzp/lzconfig.h new file mode 100644 index 0000000..65e623c --- /dev/null +++ b/tools/lzpack/lzp/lzconfig.h @@ -0,0 +1,68 @@ +/*! \file lzconfig.h + * \brief Library configuration header + * \details Define settings will only take effect when you recompile the library. + */ + +#ifndef _LZP_CONFIG_H +#define _LZP_CONFIG_H + + +#ifndef TRUE +#define TRUE 1 +#endif +#ifndef FALSE +#define FALSE 0 +#endif + + +/* Set to TRUE to compile without data compression routines useful if you + * plan to use this library on a program that does not require said routines + * especially on a platform with limited memory (such as the PlayStation). + * + * This define will rule out lzCompress(), lzSetHashSizes() and + * lzResetHashSizes() functions and their associated functions. + */ +#define LZP_NO_COMPRESS FALSE + + +/* Set to TRUE to make default compression table sizes to maximum and works best + * when compressing large amounts of data. LZP_USE_MALLOC must be set to TRUE to + * prevent stack overflow errors. + * + * Do not enable this if you plan to compile for a platform with limited memory + * otherwise, the library will consume all memory and crash the system. + * + * This define only affects lzCompress(). + */ +#define LZP_MAX_COMPRESS TRUE + + +/* Uncomment to make the library use malloc() instead of array initializers to + * allocate hash tables. Enabling this is a must if you plan to use large hash + * and window table sizes. + */ +#define LZP_USE_MALLOC TRUE + + +/* Hash table sizes (in power-of-two multiple units) + * + * These define only affect lzCompress(). + */ +#if LZP_MAX_COMPRESS == TRUE + +// Minimal defaults +#define LZP_WINDOW_SIZE 17 +#define LZP_HASH1_SIZE 8 +#define LZP_HASH2_SIZE 10 + +#else + +// Maximum defaults +#define LZP_WINDOW_SIZE 17 +#define LZP_HASH1_SIZE 22 +#define LZP_HASH2_SIZE 24 + +#endif + + +#endif // _LZP_CONFIG_H |
