line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#include "EXTERN.h" |
2
|
|
|
|
|
|
|
#include "perl.h" |
3
|
|
|
|
|
|
|
#include "XSUB.h" |
4
|
|
|
|
|
|
|
#include "ppport.h" |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
/* The following macros clash with ones from Perl. */ |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
#undef MIN |
9
|
|
|
|
|
|
|
#undef MAX |
10
|
|
|
|
|
|
|
#undef ALIGN |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
/* https://www.perlmonks.org/?node_id=11128586 */ |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
#ifdef WIN32 |
15
|
|
|
|
|
|
|
#undef malloc |
16
|
|
|
|
|
|
|
#undef free |
17
|
|
|
|
|
|
|
#endif |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
#include "libdeflate-one.c" |
20
|
|
|
|
|
|
|
#include "gzip-libdeflate-perl.c" |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
typedef gzip_libdeflate_t * Gzip__Libdeflate; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
MODULE=Gzip::Libdeflate PACKAGE=Gzip::Libdeflate |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
PROTOTYPES: DISABLE |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
Gzip::Libdeflate |
29
|
|
|
|
|
|
|
new (class, ...) |
30
|
|
|
|
|
|
|
const char * class; |
31
|
|
|
|
|
|
|
PREINIT: |
32
|
|
|
|
|
|
|
gzip_libdeflate_t * gl; |
33
|
|
|
|
|
|
|
CODE: |
34
|
38
|
|
|
|
|
|
Newxz (gl, 1, gzip_libdeflate_t); |
35
|
38
|
|
|
|
|
|
gl_init (gl); |
36
|
110
|
100
|
|
|
|
|
GLSET; |
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
37
|
38
|
|
|
|
|
|
RETVAL = gl; |
38
|
|
|
|
|
|
|
OUTPUT: |
39
|
|
|
|
|
|
|
RETVAL |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
SV * |
42
|
|
|
|
|
|
|
compress (gl, in) |
43
|
|
|
|
|
|
|
Gzip::Libdeflate gl; |
44
|
|
|
|
|
|
|
SV * in; |
45
|
|
|
|
|
|
|
CODE: |
46
|
37
|
|
|
|
|
|
RETVAL = gzip_libdeflate_compress (gl, in); |
47
|
|
|
|
|
|
|
OUTPUT: |
48
|
|
|
|
|
|
|
RETVAL |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
SV * |
51
|
|
|
|
|
|
|
decompress (gl, in, size = 0) |
52
|
|
|
|
|
|
|
Gzip::Libdeflate gl; |
53
|
|
|
|
|
|
|
SV * in; |
54
|
|
|
|
|
|
|
size_t size; |
55
|
|
|
|
|
|
|
CODE: |
56
|
40
|
|
|
|
|
|
RETVAL = gzip_libdeflate_decompress (gl, in, size); |
57
|
|
|
|
|
|
|
OUTPUT: |
58
|
|
|
|
|
|
|
RETVAL |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
void |
62
|
|
|
|
|
|
|
verbose (gl, onoff) |
63
|
|
|
|
|
|
|
Gzip::Libdeflate gl; |
64
|
|
|
|
|
|
|
SV * onoff; |
65
|
|
|
|
|
|
|
CODE: |
66
|
0
|
0
|
|
|
|
|
gl->verbose = !! SvTRUE (onoff); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
SV * |
69
|
|
|
|
|
|
|
get_type (gl) |
70
|
|
|
|
|
|
|
Gzip::Libdeflate gl; |
71
|
|
|
|
|
|
|
CODE: |
72
|
3
|
|
|
|
|
|
RETVAL = gl_get_type (gl); |
73
|
|
|
|
|
|
|
OUTPUT: |
74
|
|
|
|
|
|
|
RETVAL |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
SV * |
77
|
|
|
|
|
|
|
get_level (gl) |
78
|
|
|
|
|
|
|
Gzip::Libdeflate gl; |
79
|
|
|
|
|
|
|
CODE: |
80
|
0
|
|
|
|
|
|
RETVAL = gl_get_level (gl); |
81
|
|
|
|
|
|
|
OUTPUT: |
82
|
|
|
|
|
|
|
RETVAL |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
void |
86
|
|
|
|
|
|
|
DESTROY (gl) |
87
|
|
|
|
|
|
|
Gzip::Libdeflate gl; |
88
|
|
|
|
|
|
|
CODE: |
89
|
38
|
|
|
|
|
|
gzip_libdeflate_free (gl); |
90
|
|
|
|
|
|
|
|