PennMUSH Community

root/1.8.3/trunk/src/compress.c

Revision 1032, 1.1 kB (checked in by shawnw, 1 year ago)

Merged 1.8.3p4 into trunk

Line 
1 /**
2  * \file compress.c
3  *
4  * \brief Compression routine wrapper file for PennMUSH.
5  *
6  * This file does nothing but conditionally include the appropriate
7  * attribute compression source code.
8  *
9  */
10
11 #include "config.h"
12 #include "options.h"
13 #include <time.h>
14 /* It's rather dumb mushtype.h has to be included */
15 #include "mushtype.h"
16 #include "log.h"
17
18 #if defined(COMPRESSION_TYPE) && (COMPRESSION_TYPE == 0)
19 /* No compression */
20 char ucbuff[BUFFER_LEN];        /**< Dummy buffer for no compression */
21
22 #elif (COMPRESSION_TYPE == 1) || (COMPRESSION_TYPE == 2)
23 /* Huffman compression */
24 #include "comp_h.c"
25
26 #elif (COMPRESSION_TYPE == 3)
27 /* Word compression - necessary for Win32 */
28 #include "comp_w.c"
29 #elif (COMPRESSION_TYPE == 4)
30 /* Nearly 8-bit clean word compression. Prefer 3 unless you're using a
31  * language with an extended character set. 0x06 is the only character
32  * we can't encode right now.
33  */
34 #include "comp_w8.c"
35 #else
36 /* You didn't define it, or gave an invalid value!
37  * Lucky for you, we're forgiving. You get no compression.
38  */
39 char ucbuff[BUFFER_LEN];
40
41 #endif                          /* Compression type checks */
Note: See TracBrowser for help on using the browser.