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
|
|
|
|
|
|
|
#ifdef WIN32 |
7
|
|
|
|
|
|
|
#undef free |
8
|
|
|
|
|
|
|
#undef malloc |
9
|
|
|
|
|
|
|
#undef realloc |
10
|
|
|
|
|
|
|
#endif /* def WIN32 */ |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
#include "zopfli-one.c" |
13
|
|
|
|
|
|
|
#include "gzip-zopfli-perl.c" |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
typedef gzip_zopfli_t * Gzip__Zopfli; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
MODULE=Gzip::Zopfli PACKAGE=Gzip::Zopfli |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
PROTOTYPES: DISABLE |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
SV * |
22
|
|
|
|
|
|
|
zopfli_compress(in, ...) |
23
|
|
|
|
|
|
|
SV * in; |
24
|
|
|
|
|
|
|
PREINIT: |
25
|
3
|
|
|
|
|
|
gzip_zopfli_t gz = {0}; |
26
|
|
|
|
|
|
|
CODE: |
27
|
3
|
|
|
|
|
|
gzip_zopfli_init (& gz); |
28
|
3
|
100
|
|
|
|
|
if (items > 1) { |
29
|
2
|
50
|
|
|
|
|
if ((items - 1) % 2 != 0) { |
30
|
0
|
|
|
|
|
|
warn ("odd number of arguments ignored"); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
else { |
33
|
|
|
|
|
|
|
int i; |
34
|
4
|
100
|
|
|
|
|
for (i = 1; i < items; i += 2) { |
35
|
2
|
|
|
|
|
|
gzip_zopfli_set (& gz, ST (i), ST (i + 1)); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
} |
39
|
3
|
|
|
|
|
|
RETVAL = gzip_zopfli (& gz, in); |
40
|
|
|
|
|
|
|
OUTPUT: |
41
|
|
|
|
|
|
|
RETVAL |