/
szwrap.go
215 lines (175 loc) · 7.09 KB
/
szwrap.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
* changes to this file unless you know what you are doing--modify the SWIG
* interface file instead.
* ----------------------------------------------------------------------------- */
// source: szwrap.i
package szwrap
/*
#define intgo swig_intgo
typedef void *swig_voidp;
#include <stdint.h>
typedef long long intgo;
typedef unsigned long long uintgo;
typedef struct { char *p; intgo n; } _gostring_;
typedef struct { void* array; intgo len; intgo cap; } _goslice_;
#cgo LDFLAGS: -l:libsz.a -l:libaec.a
typedef long long swig_type_1;
typedef long long swig_type_2;
extern void _wrap_Swig_free_szwrap_f010b74e9bb20381(uintptr_t arg1);
extern uintptr_t _wrap_Swig_malloc_szwrap_f010b74e9bb20381(swig_intgo arg1);
extern swig_intgo _wrap_SZ_MAX_PIXELS_PER_SCANLINE_szwrap_f010b74e9bb20381(void);
extern void _wrap_SZ_com_t_options_mask_set_szwrap_f010b74e9bb20381(uintptr_t arg1, swig_intgo arg2);
extern swig_intgo _wrap_SZ_com_t_options_mask_get_szwrap_f010b74e9bb20381(uintptr_t arg1);
extern void _wrap_SZ_com_t_bits_per_pixel_set_szwrap_f010b74e9bb20381(uintptr_t arg1, swig_intgo arg2);
extern swig_intgo _wrap_SZ_com_t_bits_per_pixel_get_szwrap_f010b74e9bb20381(uintptr_t arg1);
extern void _wrap_SZ_com_t_pixels_per_block_set_szwrap_f010b74e9bb20381(uintptr_t arg1, swig_intgo arg2);
extern swig_intgo _wrap_SZ_com_t_pixels_per_block_get_szwrap_f010b74e9bb20381(uintptr_t arg1);
extern void _wrap_SZ_com_t_pixels_per_scanline_set_szwrap_f010b74e9bb20381(uintptr_t arg1, swig_intgo arg2);
extern swig_intgo _wrap_SZ_com_t_pixels_per_scanline_get_szwrap_f010b74e9bb20381(uintptr_t arg1);
extern uintptr_t _wrap_new_SZ_com_t_szwrap_f010b74e9bb20381(void);
extern void _wrap_delete_SZ_com_t_szwrap_f010b74e9bb20381(uintptr_t arg1);
extern swig_intgo _wrap_SZ_BufftoBuffCompress_szwrap_f010b74e9bb20381(uintptr_t arg1, swig_voidp arg2, uintptr_t arg3, swig_type_1 arg4, uintptr_t arg5);
extern swig_intgo _wrap_SZ_BufftoBuffDecompress_szwrap_f010b74e9bb20381(uintptr_t arg1, swig_voidp arg2, uintptr_t arg3, swig_type_2 arg4, uintptr_t arg5);
extern swig_intgo _wrap_SZ_encoder_enabled_szwrap_f010b74e9bb20381(void);
#undef intgo
*/
import "C"
import (
"unsafe"
)
import _ "runtime/cgo"
import "sync"
type _ unsafe.Pointer
var Swig_escape_always_false bool
var Swig_escape_val interface{}
type _swig_fnptr *byte
type _swig_memberptr *byte
type _ sync.Mutex
func Swig_free(arg1 uintptr) {
_swig_i_0 := arg1
C._wrap_Swig_free_szwrap_f010b74e9bb20381(C.uintptr_t(_swig_i_0))
}
func Swig_malloc(arg1 int) (_swig_ret uintptr) {
var swig_r uintptr
_swig_i_0 := arg1
swig_r = (uintptr)(C._wrap_Swig_malloc_szwrap_f010b74e9bb20381(C.swig_intgo(_swig_i_0)))
return swig_r
}
const SZ_ALLOW_K13_OPTION_MASK int = 1
const SZ_CHIP_OPTION_MASK int = 2
const SZ_EC_OPTION_MASK int = 4
const SZ_LSB_OPTION_MASK int = 8
const SZ_MSB_OPTION_MASK int = 16
const SZ_NN_OPTION_MASK int = 32
const SZ_RAW_OPTION_MASK int = 128
const SZ_OUTBUFF_FULL int = 2
const SZ_NO_ENCODER_ERROR int = -1
const SZ_MAX_PIXELS_PER_BLOCK int = 32
const SZ_MAX_BLOCKS_PER_SCANLINE int = 128
func _swig_getSZ_MAX_PIXELS_PER_SCANLINE() (_swig_ret int) {
var swig_r int
swig_r = (int)(C._wrap_SZ_MAX_PIXELS_PER_SCANLINE_szwrap_f010b74e9bb20381())
return swig_r
}
var SZ_MAX_PIXELS_PER_SCANLINE int = _swig_getSZ_MAX_PIXELS_PER_SCANLINE()
type SwigcptrSZ_com_t uintptr
func (p SwigcptrSZ_com_t) Swigcptr() uintptr {
return (uintptr)(p)
}
func (p SwigcptrSZ_com_t) SwigIsSZ_com_t() {
}
func (arg1 SwigcptrSZ_com_t) SetOptions_mask(arg2 int) {
_swig_i_0 := arg1
_swig_i_1 := arg2
C._wrap_SZ_com_t_options_mask_set_szwrap_f010b74e9bb20381(C.uintptr_t(_swig_i_0), C.swig_intgo(_swig_i_1))
}
func (arg1 SwigcptrSZ_com_t) GetOptions_mask() (_swig_ret int) {
var swig_r int
_swig_i_0 := arg1
swig_r = (int)(C._wrap_SZ_com_t_options_mask_get_szwrap_f010b74e9bb20381(C.uintptr_t(_swig_i_0)))
return swig_r
}
func (arg1 SwigcptrSZ_com_t) SetBits_per_pixel(arg2 int) {
_swig_i_0 := arg1
_swig_i_1 := arg2
C._wrap_SZ_com_t_bits_per_pixel_set_szwrap_f010b74e9bb20381(C.uintptr_t(_swig_i_0), C.swig_intgo(_swig_i_1))
}
func (arg1 SwigcptrSZ_com_t) GetBits_per_pixel() (_swig_ret int) {
var swig_r int
_swig_i_0 := arg1
swig_r = (int)(C._wrap_SZ_com_t_bits_per_pixel_get_szwrap_f010b74e9bb20381(C.uintptr_t(_swig_i_0)))
return swig_r
}
func (arg1 SwigcptrSZ_com_t) SetPixels_per_block(arg2 int) {
_swig_i_0 := arg1
_swig_i_1 := arg2
C._wrap_SZ_com_t_pixels_per_block_set_szwrap_f010b74e9bb20381(C.uintptr_t(_swig_i_0), C.swig_intgo(_swig_i_1))
}
func (arg1 SwigcptrSZ_com_t) GetPixels_per_block() (_swig_ret int) {
var swig_r int
_swig_i_0 := arg1
swig_r = (int)(C._wrap_SZ_com_t_pixels_per_block_get_szwrap_f010b74e9bb20381(C.uintptr_t(_swig_i_0)))
return swig_r
}
func (arg1 SwigcptrSZ_com_t) SetPixels_per_scanline(arg2 int) {
_swig_i_0 := arg1
_swig_i_1 := arg2
C._wrap_SZ_com_t_pixels_per_scanline_set_szwrap_f010b74e9bb20381(C.uintptr_t(_swig_i_0), C.swig_intgo(_swig_i_1))
}
func (arg1 SwigcptrSZ_com_t) GetPixels_per_scanline() (_swig_ret int) {
var swig_r int
_swig_i_0 := arg1
swig_r = (int)(C._wrap_SZ_com_t_pixels_per_scanline_get_szwrap_f010b74e9bb20381(C.uintptr_t(_swig_i_0)))
return swig_r
}
func NewSZ_com_t() (_swig_ret SZ_com_t) {
var swig_r SZ_com_t
swig_r = (SZ_com_t)(SwigcptrSZ_com_t(C._wrap_new_SZ_com_t_szwrap_f010b74e9bb20381()))
return swig_r
}
func DeleteSZ_com_t(arg1 SZ_com_t) {
_swig_i_0 := arg1.Swigcptr()
C._wrap_delete_SZ_com_t_szwrap_f010b74e9bb20381(C.uintptr_t(_swig_i_0))
}
type SZ_com_t interface {
Swigcptr() uintptr
SwigIsSZ_com_t()
SetOptions_mask(arg2 int)
GetOptions_mask() (_swig_ret int)
SetBits_per_pixel(arg2 int)
GetBits_per_pixel() (_swig_ret int)
SetPixels_per_block(arg2 int)
GetPixels_per_block() (_swig_ret int)
SetPixels_per_scanline(arg2 int)
GetPixels_per_scanline() (_swig_ret int)
}
func SZ_BufftoBuffCompress(arg1 uintptr, arg2 *int64, arg3 uintptr, arg4 int64, arg5 SZ_com_t) (_swig_ret int) {
var swig_r int
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
_swig_i_3 := arg4
_swig_i_4 := arg5.Swigcptr()
swig_r = (int)(C._wrap_SZ_BufftoBuffCompress_szwrap_f010b74e9bb20381(C.uintptr_t(_swig_i_0), C.swig_voidp(_swig_i_1), C.uintptr_t(_swig_i_2), C.swig_type_1(_swig_i_3), C.uintptr_t(_swig_i_4)))
return swig_r
}
func SZ_BufftoBuffDecompress(arg1 uintptr, arg2 *int64, arg3 uintptr, arg4 int64, arg5 SZ_com_t) (_swig_ret int) {
var swig_r int
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
_swig_i_3 := arg4
_swig_i_4 := arg5.Swigcptr()
swig_r = (int)(C._wrap_SZ_BufftoBuffDecompress_szwrap_f010b74e9bb20381(C.uintptr_t(_swig_i_0), C.swig_voidp(_swig_i_1), C.uintptr_t(_swig_i_2), C.swig_type_2(_swig_i_3), C.uintptr_t(_swig_i_4)))
return swig_r
}
func SZ_encoder_enabled() (_swig_ret int) {
var swig_r int
swig_r = (int)(C._wrap_SZ_encoder_enabled_szwrap_f010b74e9bb20381())
return swig_r
}