lzoruby 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. data/{README.txt → README} +3 -7
  2. data/ext/extconf.rb +4 -1
  3. metadata +24 -131
  4. data/ext/compr1b.h +0 -81
  5. data/ext/compr1c.h +0 -81
  6. data/ext/config1.h +0 -61
  7. data/ext/config1a.h +0 -196
  8. data/ext/config1b.h +0 -140
  9. data/ext/config1c.h +0 -145
  10. data/ext/config1f.h +0 -97
  11. data/ext/config1x.h +0 -118
  12. data/ext/config1y.h +0 -66
  13. data/ext/config1z.h +0 -65
  14. data/ext/config2a.h +0 -155
  15. data/ext/lzo/lzo1.h +0 -96
  16. data/ext/lzo/lzo1a.h +0 -96
  17. data/ext/lzo/lzo1b.h +0 -160
  18. data/ext/lzo/lzo1c.h +0 -160
  19. data/ext/lzo/lzo1f.h +0 -108
  20. data/ext/lzo/lzo1x.h +0 -177
  21. data/ext/lzo/lzo1y.h +0 -145
  22. data/ext/lzo/lzo1z.h +0 -150
  23. data/ext/lzo/lzo2a.h +0 -92
  24. data/ext/lzo/lzo_asm.h +0 -139
  25. data/ext/lzo/lzoconf.h +0 -417
  26. data/ext/lzo/lzodefs.h +0 -1807
  27. data/ext/lzo/lzoutil.h +0 -73
  28. data/ext/lzo1.c +0 -635
  29. data/ext/lzo1_99.c +0 -130
  30. data/ext/lzo1_cm.ch +0 -52
  31. data/ext/lzo1_d.ch +0 -155
  32. data/ext/lzo1a.c +0 -657
  33. data/ext/lzo1a_99.c +0 -130
  34. data/ext/lzo1a_cm.ch +0 -242
  35. data/ext/lzo1a_cr.ch +0 -128
  36. data/ext/lzo1a_de.h +0 -158
  37. data/ext/lzo1b_1.c +0 -46
  38. data/ext/lzo1b_2.c +0 -46
  39. data/ext/lzo1b_3.c +0 -46
  40. data/ext/lzo1b_4.c +0 -46
  41. data/ext/lzo1b_5.c +0 -46
  42. data/ext/lzo1b_6.c +0 -46
  43. data/ext/lzo1b_7.c +0 -46
  44. data/ext/lzo1b_8.c +0 -46
  45. data/ext/lzo1b_9.c +0 -46
  46. data/ext/lzo1b_99.c +0 -49
  47. data/ext/lzo1b_9x.c +0 -365
  48. data/ext/lzo1b_c.ch +0 -270
  49. data/ext/lzo1b_cc.c +0 -167
  50. data/ext/lzo1b_cc.h +0 -93
  51. data/ext/lzo1b_cm.ch +0 -294
  52. data/ext/lzo1b_cr.ch +0 -126
  53. data/ext/lzo1b_d.ch +0 -282
  54. data/ext/lzo1b_d1.c +0 -46
  55. data/ext/lzo1b_d2.c +0 -46
  56. data/ext/lzo1b_de.h +0 -344
  57. data/ext/lzo1b_r.ch +0 -117
  58. data/ext/lzo1b_rr.c +0 -43
  59. data/ext/lzo1b_sm.ch +0 -210
  60. data/ext/lzo1b_tm.ch +0 -99
  61. data/ext/lzo1b_xx.c +0 -98
  62. data/ext/lzo1c_1.c +0 -46
  63. data/ext/lzo1c_2.c +0 -46
  64. data/ext/lzo1c_3.c +0 -46
  65. data/ext/lzo1c_4.c +0 -46
  66. data/ext/lzo1c_5.c +0 -46
  67. data/ext/lzo1c_6.c +0 -46
  68. data/ext/lzo1c_7.c +0 -46
  69. data/ext/lzo1c_8.c +0 -46
  70. data/ext/lzo1c_9.c +0 -46
  71. data/ext/lzo1c_99.c +0 -49
  72. data/ext/lzo1c_9x.c +0 -379
  73. data/ext/lzo1c_cc.c +0 -167
  74. data/ext/lzo1c_cc.h +0 -93
  75. data/ext/lzo1c_d1.c +0 -46
  76. data/ext/lzo1c_d2.c +0 -46
  77. data/ext/lzo1c_rr.c +0 -43
  78. data/ext/lzo1c_xx.c +0 -98
  79. data/ext/lzo1f_1.c +0 -312
  80. data/ext/lzo1f_9x.c +0 -345
  81. data/ext/lzo1f_d.ch +0 -223
  82. data/ext/lzo1f_d1.c +0 -46
  83. data/ext/lzo1f_d2.c +0 -46
  84. data/ext/lzo1x_1.c +0 -50
  85. data/ext/lzo1x_1k.c +0 -50
  86. data/ext/lzo1x_1l.c +0 -50
  87. data/ext/lzo1x_1o.c +0 -50
  88. data/ext/lzo1x_9x.c +0 -881
  89. data/ext/lzo1x_c.ch +0 -351
  90. data/ext/lzo1x_d.ch +0 -466
  91. data/ext/lzo1x_d1.c +0 -46
  92. data/ext/lzo1x_d2.c +0 -46
  93. data/ext/lzo1x_d3.c +0 -108
  94. data/ext/lzo1x_o.c +0 -45
  95. data/ext/lzo1x_oo.ch +0 -366
  96. data/ext/lzo1y_1.c +0 -50
  97. data/ext/lzo1y_9x.c +0 -42
  98. data/ext/lzo1y_d1.c +0 -46
  99. data/ext/lzo1y_d2.c +0 -46
  100. data/ext/lzo1y_d3.c +0 -45
  101. data/ext/lzo1y_o.c +0 -45
  102. data/ext/lzo1z_9x.c +0 -42
  103. data/ext/lzo1z_d1.c +0 -46
  104. data/ext/lzo1z_d2.c +0 -46
  105. data/ext/lzo1z_d3.c +0 -45
  106. data/ext/lzo2a_9x.c +0 -357
  107. data/ext/lzo2a_d.ch +0 -188
  108. data/ext/lzo2a_d1.c +0 -46
  109. data/ext/lzo2a_d2.c +0 -46
  110. data/ext/lzo_conf.h +0 -323
  111. data/ext/lzo_crc.c +0 -167
  112. data/ext/lzo_dict.h +0 -316
  113. data/ext/lzo_dll.ch +0 -64
  114. data/ext/lzo_init.c +0 -176
  115. data/ext/lzo_mchw.ch +0 -242
  116. data/ext/lzo_ptr.c +0 -92
  117. data/ext/lzo_ptr.h +0 -154
  118. data/ext/lzo_str.c +0 -71
  119. data/ext/lzo_swd.ch +0 -707
  120. data/ext/lzo_util.c +0 -165
  121. data/ext/miniacc.h +0 -6553
  122. data/ext/stats1a.h +0 -137
  123. data/ext/stats1b.h +0 -142
  124. data/ext/stats1c.h +0 -61
@@ -1,92 +0,0 @@
1
- /* lzo2a.h -- public interface of the LZO2A compression algorithm
2
-
3
- This file is part of the LZO real-time data compression library.
4
-
5
- Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
6
- Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
7
- Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
8
- Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
9
- Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
10
- Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
11
- Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
12
- Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
13
- Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
14
- Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
15
- Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
16
- Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
17
- Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
18
- All Rights Reserved.
19
-
20
- The LZO library is free software; you can redistribute it and/or
21
- modify it under the terms of the GNU General Public License as
22
- published by the Free Software Foundation; either version 2 of
23
- the License, or (at your option) any later version.
24
-
25
- The LZO library is distributed in the hope that it will be useful,
26
- but WITHOUT ANY WARRANTY; without even the implied warranty of
27
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28
- GNU General Public License for more details.
29
-
30
- You should have received a copy of the GNU General Public License
31
- along with the LZO library; see the file COPYING.
32
- If not, write to the Free Software Foundation, Inc.,
33
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
34
-
35
- Markus F.X.J. Oberhumer
36
- <markus@oberhumer.com>
37
- http://www.oberhumer.com/opensource/lzo/
38
- */
39
-
40
-
41
- #ifndef __LZO2A_H_INCLUDED
42
- #define __LZO2A_H_INCLUDED
43
-
44
- #ifndef __LZOCONF_H_INCLUDED
45
- #include "lzoconf.h"
46
- #endif
47
-
48
- #ifdef __cplusplus
49
- extern "C" {
50
- #endif
51
-
52
-
53
- /***********************************************************************
54
- //
55
- ************************************************************************/
56
-
57
- #define LZO2A_MEM_DECOMPRESS (0)
58
-
59
- /* decompression */
60
- LZO_EXTERN(int)
61
- lzo2a_decompress ( const lzo_bytep src, lzo_uint src_len,
62
- lzo_bytep dst, lzo_uintp dst_len,
63
- lzo_voidp wrkmem /* NOT USED */ );
64
-
65
- /* safe decompression with overrun testing */
66
- LZO_EXTERN(int)
67
- lzo2a_decompress_safe ( const lzo_bytep src, lzo_uint src_len,
68
- lzo_bytep dst, lzo_uintp dst_len,
69
- lzo_voidp wrkmem /* NOT USED */ );
70
-
71
-
72
- /***********************************************************************
73
- // better compression ratio at the cost of more memory and time
74
- ************************************************************************/
75
-
76
- #define LZO2A_999_MEM_COMPRESS ((lzo_uint32) (8 * 16384L * sizeof(short)))
77
-
78
- LZO_EXTERN(int)
79
- lzo2a_999_compress ( const lzo_bytep src, lzo_uint src_len,
80
- lzo_bytep dst, lzo_uintp dst_len,
81
- lzo_voidp wrkmem );
82
-
83
-
84
-
85
- #ifdef __cplusplus
86
- } /* extern "C" */
87
- #endif
88
-
89
- #endif /* already included */
90
-
91
-
92
- /* vim:set ts=4 et: */
@@ -1,139 +0,0 @@
1
- /* lzo_asm.h -- assembler prototypes for the LZO data compression library
2
-
3
- This file is part of the LZO real-time data compression library.
4
-
5
- Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
6
- Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
7
- Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
8
- Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
9
- Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
10
- Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
11
- Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
12
- Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
13
- Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
14
- Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
15
- Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
16
- Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
17
- Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
18
- All Rights Reserved.
19
-
20
- The LZO library is free software; you can redistribute it and/or
21
- modify it under the terms of the GNU General Public License as
22
- published by the Free Software Foundation; either version 2 of
23
- the License, or (at your option) any later version.
24
-
25
- The LZO library is distributed in the hope that it will be useful,
26
- but WITHOUT ANY WARRANTY; without even the implied warranty of
27
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28
- GNU General Public License for more details.
29
-
30
- You should have received a copy of the GNU General Public License
31
- along with the LZO library; see the file COPYING.
32
- If not, write to the Free Software Foundation, Inc.,
33
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
34
-
35
- Markus F.X.J. Oberhumer
36
- <markus@oberhumer.com>
37
- http://www.oberhumer.com/opensource/lzo/
38
- */
39
-
40
-
41
- #ifndef __LZO_ASM_H_INCLUDED
42
- #define __LZO_ASM_H_INCLUDED
43
-
44
- #ifndef __LZOCONF_H_INCLUDED
45
- #include "lzoconf.h"
46
- #endif
47
-
48
- #ifdef __cplusplus
49
- extern "C" {
50
- #endif
51
-
52
-
53
- /***********************************************************************
54
- // assembly decompressors
55
- ************************************************************************/
56
-
57
- LZO_EXTERN(int) lzo1c_decompress_asm
58
- (const lzo_bytep src, lzo_uint src_len,
59
- lzo_bytep dst, lzo_uintp dst_len,
60
- lzo_voidp wrkmem);
61
- LZO_EXTERN(int) lzo1c_decompress_asm_safe
62
- (const lzo_bytep src, lzo_uint src_len,
63
- lzo_bytep dst, lzo_uintp dst_len,
64
- lzo_voidp wrkmem);
65
-
66
- LZO_EXTERN(int) lzo1f_decompress_asm_fast
67
- (const lzo_bytep src, lzo_uint src_len,
68
- lzo_bytep dst, lzo_uintp dst_len,
69
- lzo_voidp wrkmem);
70
- LZO_EXTERN(int) lzo1f_decompress_asm_fast_safe
71
- (const lzo_bytep src, lzo_uint src_len,
72
- lzo_bytep dst, lzo_uintp dst_len,
73
- lzo_voidp wrkmem);
74
-
75
- LZO_EXTERN(int) lzo1x_decompress_asm
76
- (const lzo_bytep src, lzo_uint src_len,
77
- lzo_bytep dst, lzo_uintp dst_len,
78
- lzo_voidp wrkmem);
79
- LZO_EXTERN(int) lzo1x_decompress_asm_safe
80
- (const lzo_bytep src, lzo_uint src_len,
81
- lzo_bytep dst, lzo_uintp dst_len,
82
- lzo_voidp wrkmem);
83
- LZO_EXTERN(int) lzo1x_decompress_asm_fast
84
- (const lzo_bytep src, lzo_uint src_len,
85
- lzo_bytep dst, lzo_uintp dst_len,
86
- lzo_voidp wrkmem);
87
- LZO_EXTERN(int) lzo1x_decompress_asm_fast_safe
88
- (const lzo_bytep src, lzo_uint src_len,
89
- lzo_bytep dst, lzo_uintp dst_len,
90
- lzo_voidp wrkmem);
91
-
92
- LZO_EXTERN(int) lzo1y_decompress_asm
93
- (const lzo_bytep src, lzo_uint src_len,
94
- lzo_bytep dst, lzo_uintp dst_len,
95
- lzo_voidp wrkmem);
96
- LZO_EXTERN(int) lzo1y_decompress_asm_safe
97
- (const lzo_bytep src, lzo_uint src_len,
98
- lzo_bytep dst, lzo_uintp dst_len,
99
- lzo_voidp wrkmem);
100
- LZO_EXTERN(int) lzo1y_decompress_asm_fast
101
- (const lzo_bytep src, lzo_uint src_len,
102
- lzo_bytep dst, lzo_uintp dst_len,
103
- lzo_voidp wrkmem);
104
- LZO_EXTERN(int) lzo1y_decompress_asm_fast_safe
105
- (const lzo_bytep src, lzo_uint src_len,
106
- lzo_bytep dst, lzo_uintp dst_len,
107
- lzo_voidp wrkmem);
108
-
109
-
110
- /***********************************************************************
111
- // checksum and misc functions
112
- ************************************************************************/
113
-
114
- #if 0
115
-
116
- LZO_EXTERN(lzo_uint32)
117
- lzo_crc32_asm(lzo_uint32 _c, const lzo_bytep _buf, lzo_uint _len,
118
- const lzo_uint32p _crc_table);
119
-
120
- LZO_EXTERN(lzo_uint32)
121
- lzo_crc32_asm_small(lzo_uint32 _c, const lzo_bytep _buf, lzo_uint _len);
122
-
123
- LZO_EXTERN(int)
124
- lzo_cpuid_asm(lzo_uint32p /* lzo_uint32 info[16] */ );
125
-
126
- LZO_EXTERN(lzo_uint32)
127
- lzo_rdtsc_asm(lzo_uint32p /* lzo_uint32 ticks[2] */ );
128
-
129
- #endif
130
-
131
-
132
- #ifdef __cplusplus
133
- } /* extern "C" */
134
- #endif
135
-
136
- #endif /* already included */
137
-
138
-
139
- /* vim:set ts=4 et: */
@@ -1,417 +0,0 @@
1
- /* lzoconf.h -- configuration for the LZO real-time data compression library
2
-
3
- This file is part of the LZO real-time data compression library.
4
-
5
- Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
6
- Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
7
- Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
8
- Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
9
- Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
10
- Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
11
- Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
12
- Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
13
- Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
14
- Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
15
- Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
16
- Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
17
- Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
18
- All Rights Reserved.
19
-
20
- The LZO library is free software; you can redistribute it and/or
21
- modify it under the terms of the GNU General Public License as
22
- published by the Free Software Foundation; either version 2 of
23
- the License, or (at your option) any later version.
24
-
25
- The LZO library is distributed in the hope that it will be useful,
26
- but WITHOUT ANY WARRANTY; without even the implied warranty of
27
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28
- GNU General Public License for more details.
29
-
30
- You should have received a copy of the GNU General Public License
31
- along with the LZO library; see the file COPYING.
32
- If not, write to the Free Software Foundation, Inc.,
33
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
34
-
35
- Markus F.X.J. Oberhumer
36
- <markus@oberhumer.com>
37
- http://www.oberhumer.com/opensource/lzo/
38
- */
39
-
40
-
41
- #ifndef __LZOCONF_H_INCLUDED
42
- #define __LZOCONF_H_INCLUDED
43
-
44
- #define LZO_VERSION 0x2030
45
- #define LZO_VERSION_STRING "2.03"
46
- #define LZO_VERSION_DATE "Apr 30 2008"
47
-
48
- /* internal Autoconf configuration file - only used when building LZO */
49
- #if defined(LZO_HAVE_CONFIG_H)
50
- # include <config.h>
51
- #endif
52
- #include <limits.h>
53
- #include <stddef.h>
54
-
55
-
56
- /***********************************************************************
57
- // LZO requires a conforming <limits.h>
58
- ************************************************************************/
59
-
60
- #if !defined(CHAR_BIT) || (CHAR_BIT != 8)
61
- # error "invalid CHAR_BIT"
62
- #endif
63
- #if !defined(UCHAR_MAX) || !defined(UINT_MAX) || !defined(ULONG_MAX)
64
- # error "check your compiler installation"
65
- #endif
66
- #if (USHRT_MAX < 1) || (UINT_MAX < 1) || (ULONG_MAX < 1)
67
- # error "your limits.h macros are broken"
68
- #endif
69
-
70
- /* get OS and architecture defines */
71
- #ifndef __LZODEFS_H_INCLUDED
72
- #include "lzodefs.h"
73
- #endif
74
-
75
-
76
- #ifdef __cplusplus
77
- extern "C" {
78
- #endif
79
-
80
-
81
- /***********************************************************************
82
- // some core defines
83
- ************************************************************************/
84
-
85
- #if !defined(LZO_UINT32_C)
86
- # if (UINT_MAX < LZO_0xffffffffL)
87
- # define LZO_UINT32_C(c) c ## UL
88
- # else
89
- # define LZO_UINT32_C(c) ((c) + 0U)
90
- # endif
91
- #endif
92
-
93
- /* memory checkers */
94
- #if !defined(__LZO_CHECKER)
95
- # if defined(__BOUNDS_CHECKING_ON)
96
- # define __LZO_CHECKER 1
97
- # elif defined(__CHECKER__)
98
- # define __LZO_CHECKER 1
99
- # elif defined(__INSURE__)
100
- # define __LZO_CHECKER 1
101
- # elif defined(__PURIFY__)
102
- # define __LZO_CHECKER 1
103
- # endif
104
- #endif
105
-
106
-
107
- /***********************************************************************
108
- // integral and pointer types
109
- ************************************************************************/
110
-
111
- /* lzo_uint should match size_t */
112
- #if !defined(LZO_UINT_MAX)
113
- # if defined(LZO_ABI_LLP64) /* WIN64 */
114
- # if defined(LZO_OS_WIN64)
115
- typedef unsigned __int64 lzo_uint;
116
- typedef __int64 lzo_int;
117
- # else
118
- typedef unsigned long long lzo_uint;
119
- typedef long long lzo_int;
120
- # endif
121
- # define LZO_UINT_MAX 0xffffffffffffffffull
122
- # define LZO_INT_MAX 9223372036854775807LL
123
- # define LZO_INT_MIN (-1LL - LZO_INT_MAX)
124
- # elif defined(LZO_ABI_IP32L64) /* MIPS R5900 */
125
- typedef unsigned int lzo_uint;
126
- typedef int lzo_int;
127
- # define LZO_UINT_MAX UINT_MAX
128
- # define LZO_INT_MAX INT_MAX
129
- # define LZO_INT_MIN INT_MIN
130
- # elif (ULONG_MAX >= LZO_0xffffffffL)
131
- typedef unsigned long lzo_uint;
132
- typedef long lzo_int;
133
- # define LZO_UINT_MAX ULONG_MAX
134
- # define LZO_INT_MAX LONG_MAX
135
- # define LZO_INT_MIN LONG_MIN
136
- # else
137
- # error "lzo_uint"
138
- # endif
139
- #endif
140
-
141
- /* Integral types with 32 bits or more. */
142
- #if !defined(LZO_UINT32_MAX)
143
- # if (UINT_MAX >= LZO_0xffffffffL)
144
- typedef unsigned int lzo_uint32;
145
- typedef int lzo_int32;
146
- # define LZO_UINT32_MAX UINT_MAX
147
- # define LZO_INT32_MAX INT_MAX
148
- # define LZO_INT32_MIN INT_MIN
149
- # elif (ULONG_MAX >= LZO_0xffffffffL)
150
- typedef unsigned long lzo_uint32;
151
- typedef long lzo_int32;
152
- # define LZO_UINT32_MAX ULONG_MAX
153
- # define LZO_INT32_MAX LONG_MAX
154
- # define LZO_INT32_MIN LONG_MIN
155
- # else
156
- # error "lzo_uint32"
157
- # endif
158
- #endif
159
-
160
- /* The larger type of lzo_uint and lzo_uint32. */
161
- #if (LZO_UINT_MAX >= LZO_UINT32_MAX)
162
- # define lzo_xint lzo_uint
163
- #else
164
- # define lzo_xint lzo_uint32
165
- #endif
166
-
167
- /* Memory model that allows to access memory at offsets of lzo_uint. */
168
- #if !defined(__LZO_MMODEL)
169
- # if (LZO_UINT_MAX <= UINT_MAX)
170
- # define __LZO_MMODEL
171
- # elif defined(LZO_HAVE_MM_HUGE_PTR)
172
- # define __LZO_MMODEL_HUGE 1
173
- # define __LZO_MMODEL __huge
174
- # else
175
- # define __LZO_MMODEL
176
- # endif
177
- #endif
178
-
179
- /* no typedef here because of const-pointer issues */
180
- #define lzo_bytep unsigned char __LZO_MMODEL *
181
- #define lzo_charp char __LZO_MMODEL *
182
- #define lzo_voidp void __LZO_MMODEL *
183
- #define lzo_shortp short __LZO_MMODEL *
184
- #define lzo_ushortp unsigned short __LZO_MMODEL *
185
- #define lzo_uint32p lzo_uint32 __LZO_MMODEL *
186
- #define lzo_int32p lzo_int32 __LZO_MMODEL *
187
- #define lzo_uintp lzo_uint __LZO_MMODEL *
188
- #define lzo_intp lzo_int __LZO_MMODEL *
189
- #define lzo_xintp lzo_xint __LZO_MMODEL *
190
- #define lzo_voidpp lzo_voidp __LZO_MMODEL *
191
- #define lzo_bytepp lzo_bytep __LZO_MMODEL *
192
- /* deprecated - use `lzo_bytep' instead of `lzo_byte *' */
193
- #define lzo_byte unsigned char __LZO_MMODEL
194
-
195
- typedef int lzo_bool;
196
-
197
-
198
- /***********************************************************************
199
- // function types
200
- ************************************************************************/
201
-
202
- /* name mangling */
203
- #if !defined(__LZO_EXTERN_C)
204
- # ifdef __cplusplus
205
- # define __LZO_EXTERN_C extern "C"
206
- # else
207
- # define __LZO_EXTERN_C extern
208
- # endif
209
- #endif
210
-
211
- /* calling convention */
212
- #if !defined(__LZO_CDECL)
213
- # define __LZO_CDECL __lzo_cdecl
214
- #endif
215
-
216
- /* DLL export information */
217
- #if !defined(__LZO_EXPORT1)
218
- # define __LZO_EXPORT1
219
- #endif
220
- #if !defined(__LZO_EXPORT2)
221
- # define __LZO_EXPORT2
222
- #endif
223
-
224
- /* __cdecl calling convention for public C and assembly functions */
225
- #if !defined(LZO_PUBLIC)
226
- # define LZO_PUBLIC(_rettype) __LZO_EXPORT1 _rettype __LZO_EXPORT2 __LZO_CDECL
227
- #endif
228
- #if !defined(LZO_EXTERN)
229
- # define LZO_EXTERN(_rettype) __LZO_EXTERN_C LZO_PUBLIC(_rettype)
230
- #endif
231
- #if !defined(LZO_PRIVATE)
232
- # define LZO_PRIVATE(_rettype) static _rettype __LZO_CDECL
233
- #endif
234
-
235
- /* function types */
236
- typedef int
237
- (__LZO_CDECL *lzo_compress_t) ( const lzo_bytep src, lzo_uint src_len,
238
- lzo_bytep dst, lzo_uintp dst_len,
239
- lzo_voidp wrkmem );
240
-
241
- typedef int
242
- (__LZO_CDECL *lzo_decompress_t) ( const lzo_bytep src, lzo_uint src_len,
243
- lzo_bytep dst, lzo_uintp dst_len,
244
- lzo_voidp wrkmem );
245
-
246
- typedef int
247
- (__LZO_CDECL *lzo_optimize_t) ( lzo_bytep src, lzo_uint src_len,
248
- lzo_bytep dst, lzo_uintp dst_len,
249
- lzo_voidp wrkmem );
250
-
251
- typedef int
252
- (__LZO_CDECL *lzo_compress_dict_t)(const lzo_bytep src, lzo_uint src_len,
253
- lzo_bytep dst, lzo_uintp dst_len,
254
- lzo_voidp wrkmem,
255
- const lzo_bytep dict, lzo_uint dict_len );
256
-
257
- typedef int
258
- (__LZO_CDECL *lzo_decompress_dict_t)(const lzo_bytep src, lzo_uint src_len,
259
- lzo_bytep dst, lzo_uintp dst_len,
260
- lzo_voidp wrkmem,
261
- const lzo_bytep dict, lzo_uint dict_len );
262
-
263
-
264
- /* Callback interface. Currently only the progress indicator ("nprogress")
265
- * is used, but this may change in a future release. */
266
-
267
- struct lzo_callback_t;
268
- typedef struct lzo_callback_t lzo_callback_t;
269
- #define lzo_callback_p lzo_callback_t __LZO_MMODEL *
270
-
271
- /* malloc & free function types */
272
- typedef lzo_voidp (__LZO_CDECL *lzo_alloc_func_t)
273
- (lzo_callback_p self, lzo_uint items, lzo_uint size);
274
- typedef void (__LZO_CDECL *lzo_free_func_t)
275
- (lzo_callback_p self, lzo_voidp ptr);
276
-
277
- /* a progress indicator callback function */
278
- typedef void (__LZO_CDECL *lzo_progress_func_t)
279
- (lzo_callback_p, lzo_uint, lzo_uint, int);
280
-
281
- struct lzo_callback_t
282
- {
283
- /* custom allocators (set to 0 to disable) */
284
- lzo_alloc_func_t nalloc; /* [not used right now] */
285
- lzo_free_func_t nfree; /* [not used right now] */
286
-
287
- /* a progress indicator callback function (set to 0 to disable) */
288
- lzo_progress_func_t nprogress;
289
-
290
- /* NOTE: the first parameter "self" of the nalloc/nfree/nprogress
291
- * callbacks points back to this struct, so you are free to store
292
- * some extra info in the following variables. */
293
- lzo_voidp user1;
294
- lzo_xint user2;
295
- lzo_xint user3;
296
- };
297
-
298
-
299
- /***********************************************************************
300
- // error codes and prototypes
301
- ************************************************************************/
302
-
303
- /* Error codes for the compression/decompression functions. Negative
304
- * values are errors, positive values will be used for special but
305
- * normal events.
306
- */
307
- #define LZO_E_OK 0
308
- #define LZO_E_ERROR (-1)
309
- #define LZO_E_OUT_OF_MEMORY (-2) /* [not used right now] */
310
- #define LZO_E_NOT_COMPRESSIBLE (-3) /* [not used right now] */
311
- #define LZO_E_INPUT_OVERRUN (-4)
312
- #define LZO_E_OUTPUT_OVERRUN (-5)
313
- #define LZO_E_LOOKBEHIND_OVERRUN (-6)
314
- #define LZO_E_EOF_NOT_FOUND (-7)
315
- #define LZO_E_INPUT_NOT_CONSUMED (-8)
316
- #define LZO_E_NOT_YET_IMPLEMENTED (-9) /* [not used right now] */
317
-
318
-
319
- #ifndef lzo_sizeof_dict_t
320
- # define lzo_sizeof_dict_t ((unsigned)sizeof(lzo_bytep))
321
- #endif
322
-
323
- /* lzo_init() should be the first function you call.
324
- * Check the return code !
325
- *
326
- * lzo_init() is a macro to allow checking that the library and the
327
- * compiler's view of various types are consistent.
328
- */
329
- #define lzo_init() __lzo_init_v2(LZO_VERSION,(int)sizeof(short),(int)sizeof(int),\
330
- (int)sizeof(long),(int)sizeof(lzo_uint32),(int)sizeof(lzo_uint),\
331
- (int)lzo_sizeof_dict_t,(int)sizeof(char *),(int)sizeof(lzo_voidp),\
332
- (int)sizeof(lzo_callback_t))
333
- LZO_EXTERN(int) __lzo_init_v2(unsigned,int,int,int,int,int,int,int,int,int);
334
-
335
- /* version functions (useful for shared libraries) */
336
- LZO_EXTERN(unsigned) lzo_version(void);
337
- LZO_EXTERN(const char *) lzo_version_string(void);
338
- LZO_EXTERN(const char *) lzo_version_date(void);
339
- LZO_EXTERN(const lzo_charp) _lzo_version_string(void);
340
- LZO_EXTERN(const lzo_charp) _lzo_version_date(void);
341
-
342
- /* string functions */
343
- LZO_EXTERN(int)
344
- lzo_memcmp(const lzo_voidp _s1, const lzo_voidp _s2, lzo_uint _len);
345
- LZO_EXTERN(lzo_voidp)
346
- lzo_memcpy(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len);
347
- LZO_EXTERN(lzo_voidp)
348
- lzo_memmove(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len);
349
- LZO_EXTERN(lzo_voidp)
350
- lzo_memset(lzo_voidp _s, int _c, lzo_uint _len);
351
-
352
- /* checksum functions */
353
- LZO_EXTERN(lzo_uint32)
354
- lzo_adler32(lzo_uint32 _adler, const lzo_bytep _buf, lzo_uint _len);
355
- LZO_EXTERN(lzo_uint32)
356
- lzo_crc32(lzo_uint32 _c, const lzo_bytep _buf, lzo_uint _len);
357
- LZO_EXTERN(const lzo_uint32p)
358
- lzo_get_crc32_table(void);
359
-
360
- /* misc. */
361
- LZO_EXTERN(int) _lzo_config_check(void);
362
- typedef union { lzo_bytep p; lzo_uint u; } __lzo_pu_u;
363
- typedef union { lzo_bytep p; lzo_uint32 u32; } __lzo_pu32_u;
364
- typedef union { void *vp; lzo_bytep bp; lzo_uint32 u32; long l; } lzo_align_t;
365
-
366
- /* align a char pointer on a boundary that is a multiple of `size' */
367
- LZO_EXTERN(unsigned) __lzo_align_gap(const lzo_voidp _ptr, lzo_uint _size);
368
- #define LZO_PTR_ALIGN_UP(_ptr,_size) \
369
- ((_ptr) + (lzo_uint) __lzo_align_gap((const lzo_voidp)(_ptr),(lzo_uint)(_size)))
370
-
371
-
372
- /***********************************************************************
373
- // deprecated macros - only for backward compatibility with LZO v1.xx
374
- ************************************************************************/
375
-
376
- #if defined(LZO_CFG_COMPAT)
377
-
378
- #define __LZOCONF_H 1
379
-
380
- #if defined(LZO_ARCH_I086)
381
- # define __LZO_i386 1
382
- #elif defined(LZO_ARCH_I386)
383
- # define __LZO_i386 1
384
- #endif
385
-
386
- #if defined(LZO_OS_DOS16)
387
- # define __LZO_DOS 1
388
- # define __LZO_DOS16 1
389
- #elif defined(LZO_OS_DOS32)
390
- # define __LZO_DOS 1
391
- #elif defined(LZO_OS_WIN16)
392
- # define __LZO_WIN 1
393
- # define __LZO_WIN16 1
394
- #elif defined(LZO_OS_WIN32)
395
- # define __LZO_WIN 1
396
- #endif
397
-
398
- #define __LZO_CMODEL
399
- #define __LZO_DMODEL
400
- #define __LZO_ENTRY __LZO_CDECL
401
- #define LZO_EXTERN_CDECL LZO_EXTERN
402
- #define LZO_ALIGN LZO_PTR_ALIGN_UP
403
-
404
- #define lzo_compress_asm_t lzo_compress_t
405
- #define lzo_decompress_asm_t lzo_decompress_t
406
-
407
- #endif /* LZO_CFG_COMPAT */
408
-
409
-
410
- #ifdef __cplusplus
411
- } /* extern "C" */
412
- #endif
413
-
414
- #endif /* already included */
415
-
416
-
417
- /* vim:set ts=4 et: */