added some useless function attributes
[awish.git] / src / libwdx / libwdx.h
blobbaa04cea1c7d27c7a8b4b2fae170a64123bb02ba
1 /*
2 * original code: WDOSX-Pack v1.07, (c) 1999-2001 by Joergen Ibsen / Jibz
3 * for data and executable compression software: http://www.ibsensoftware.com/
4 */
5 #ifndef WDXLIB_H
6 #define WDXLIB_H
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
12 #include <stdint.h>
15 #ifndef WDX_EXCLUDE_CRC
16 /* poly: 0xedb88320L: ISO 3309, ITU-T V.42 */
17 extern uint32_t wdxCRC32 (const void *src, int len) __attribute__((pure));
18 #endif
20 #ifndef WDX_EXCLUDE_PACKER
21 /* compress buffer
22 * return -1 or size of the packed data
23 * uncompressible data may be expanded by up to 1 bit per byte:
24 * i.e. the destination should be length+((length+7)/8)+2 bytes
26 extern int wdxPack (void *dest, int destSize, const void *source, int length);
28 /* returs max size of the packed data with the given length */
29 extern int wdxPackBufferSize (int inSize) __attribute__((const));
30 #endif
32 #ifndef WDX_EXCLUDE_UNPACKER
33 /* decompress buffer
34 * return -1 or size of the unpacked data
36 extern int wdxUnpack (void *bufOut, int outSize, const void *bufIn, int inSize);
37 #endif
40 #ifdef __cplusplus
42 #endif
43 #endif