zstdlib 0.1.0-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGES.md +9 -0
- data/Gemfile +3 -0
- data/README.md +96 -0
- data/Rakefile +29 -0
- data/ext/zstdlib/extconf.rb +53 -0
- data/ext/zstdlib/ruby/zlib-2.2/zlib.c +4659 -0
- data/ext/zstdlib/ruby/zlib-2.3/zlib.c +4686 -0
- data/ext/zstdlib/ruby/zlib-2.4/zlib.c +4843 -0
- data/ext/zstdlib/ruby/zlib-2.5/zlib.c +4848 -0
- data/ext/zstdlib/ruby/zlib-2.6/zlib.c +4890 -0
- data/ext/zstdlib/zlib-1.2.11/adler32.c +186 -0
- data/ext/zstdlib/zlib-1.2.11/compress.c +86 -0
- data/ext/zstdlib/zlib-1.2.11/crc32.c +442 -0
- data/ext/zstdlib/zlib-1.2.11/crc32.h +441 -0
- data/ext/zstdlib/zlib-1.2.11/deflate.c +2163 -0
- data/ext/zstdlib/zlib-1.2.11/deflate.h +349 -0
- data/ext/zstdlib/zlib-1.2.11/gzclose.c +25 -0
- data/ext/zstdlib/zlib-1.2.11/gzguts.h +218 -0
- data/ext/zstdlib/zlib-1.2.11/gzlib.c +637 -0
- data/ext/zstdlib/zlib-1.2.11/gzread.c +654 -0
- data/ext/zstdlib/zlib-1.2.11/gzwrite.c +665 -0
- data/ext/zstdlib/zlib-1.2.11/infback.c +640 -0
- data/ext/zstdlib/zlib-1.2.11/inffast.c +323 -0
- data/ext/zstdlib/zlib-1.2.11/inffast.h +11 -0
- data/ext/zstdlib/zlib-1.2.11/inffixed.h +94 -0
- data/ext/zstdlib/zlib-1.2.11/inflate.c +1561 -0
- data/ext/zstdlib/zlib-1.2.11/inflate.h +125 -0
- data/ext/zstdlib/zlib-1.2.11/inftrees.c +304 -0
- data/ext/zstdlib/zlib-1.2.11/inftrees.h +62 -0
- data/ext/zstdlib/zlib-1.2.11/trees.c +1203 -0
- data/ext/zstdlib/zlib-1.2.11/trees.h +128 -0
- data/ext/zstdlib/zlib-1.2.11/uncompr.c +93 -0
- data/ext/zstdlib/zlib-1.2.11/zconf.h +534 -0
- data/ext/zstdlib/zlib-1.2.11/zlib.h +1912 -0
- data/ext/zstdlib/zlib-1.2.11/zutil.c +325 -0
- data/ext/zstdlib/zlib-1.2.11/zutil.h +271 -0
- data/ext/zstdlib/zlib.mk +14 -0
- data/ext/zstdlib/zlibwrapper.mk +14 -0
- data/ext/zstdlib/zlibwrapper/zlibwrapper.c +14 -0
- data/ext/zstdlib/zstd-1.3.8/lib/common/bitstream.h +455 -0
- data/ext/zstdlib/zstd-1.3.8/lib/common/compiler.h +140 -0
- data/ext/zstdlib/zstd-1.3.8/lib/common/cpu.h +215 -0
- data/ext/zstdlib/zstd-1.3.8/lib/common/debug.c +44 -0
- data/ext/zstdlib/zstd-1.3.8/lib/common/debug.h +134 -0
- data/ext/zstdlib/zstd-1.3.8/lib/common/entropy_common.c +236 -0
- data/ext/zstdlib/zstd-1.3.8/lib/common/error_private.c +54 -0
- data/ext/zstdlib/zstd-1.3.8/lib/common/error_private.h +76 -0
- data/ext/zstdlib/zstd-1.3.8/lib/common/fse.h +708 -0
- data/ext/zstdlib/zstd-1.3.8/lib/common/fse_decompress.c +309 -0
- data/ext/zstdlib/zstd-1.3.8/lib/common/huf.h +358 -0
- data/ext/zstdlib/zstd-1.3.8/lib/common/mem.h +380 -0
- data/ext/zstdlib/zstd-1.3.8/lib/common/pool.c +340 -0
- data/ext/zstdlib/zstd-1.3.8/lib/common/pool.h +84 -0
- data/ext/zstdlib/zstd-1.3.8/lib/common/threading.c +75 -0
- data/ext/zstdlib/zstd-1.3.8/lib/common/threading.h +123 -0
- data/ext/zstdlib/zstd-1.3.8/lib/common/xxhash.c +876 -0
- data/ext/zstdlib/zstd-1.3.8/lib/common/xxhash.h +305 -0
- data/ext/zstdlib/zstd-1.3.8/lib/common/zstd_common.c +83 -0
- data/ext/zstdlib/zstd-1.3.8/lib/common/zstd_errors.h +93 -0
- data/ext/zstdlib/zstd-1.3.8/lib/common/zstd_internal.h +266 -0
- data/ext/zstdlib/zstd-1.3.8/lib/compress/fse_compress.c +721 -0
- data/ext/zstdlib/zstd-1.3.8/lib/compress/hist.c +203 -0
- data/ext/zstdlib/zstd-1.3.8/lib/compress/hist.h +95 -0
- data/ext/zstdlib/zstd-1.3.8/lib/compress/huf_compress.c +798 -0
- data/ext/zstdlib/zstd-1.3.8/lib/compress/zstd_compress.c +4290 -0
- data/ext/zstdlib/zstd-1.3.8/lib/compress/zstd_compress_internal.h +860 -0
- data/ext/zstdlib/zstd-1.3.8/lib/compress/zstd_double_fast.c +499 -0
- data/ext/zstdlib/zstd-1.3.8/lib/compress/zstd_double_fast.h +38 -0
- data/ext/zstdlib/zstd-1.3.8/lib/compress/zstd_fast.c +391 -0
- data/ext/zstdlib/zstd-1.3.8/lib/compress/zstd_fast.h +37 -0
- data/ext/zstdlib/zstd-1.3.8/lib/compress/zstd_lazy.c +1106 -0
- data/ext/zstdlib/zstd-1.3.8/lib/compress/zstd_lazy.h +67 -0
- data/ext/zstdlib/zstd-1.3.8/lib/compress/zstd_ldm.c +597 -0
- data/ext/zstdlib/zstd-1.3.8/lib/compress/zstd_ldm.h +105 -0
- data/ext/zstdlib/zstd-1.3.8/lib/compress/zstd_opt.c +1217 -0
- data/ext/zstdlib/zstd-1.3.8/lib/compress/zstd_opt.h +56 -0
- data/ext/zstdlib/zstd-1.3.8/lib/compress/zstdmt_compress.c +2107 -0
- data/ext/zstdlib/zstd-1.3.8/lib/compress/zstdmt_compress.h +174 -0
- data/ext/zstdlib/zstd-1.3.8/lib/decompress/huf_decompress.c +1232 -0
- data/ext/zstdlib/zstd-1.3.8/lib/decompress/zstd_ddict.c +240 -0
- data/ext/zstdlib/zstd-1.3.8/lib/decompress/zstd_ddict.h +44 -0
- data/ext/zstdlib/zstd-1.3.8/lib/decompress/zstd_decompress.c +1672 -0
- data/ext/zstdlib/zstd-1.3.8/lib/decompress/zstd_decompress_block.c +1307 -0
- data/ext/zstdlib/zstd-1.3.8/lib/decompress/zstd_decompress_block.h +59 -0
- data/ext/zstdlib/zstd-1.3.8/lib/decompress/zstd_decompress_internal.h +168 -0
- data/ext/zstdlib/zstd-1.3.8/lib/zstd.h +1766 -0
- data/ext/zstdlib/zstd-1.3.8/zlibWrapper/gzclose.c +28 -0
- data/ext/zstdlib/zstd-1.3.8/zlibWrapper/gzcompatibility.h +68 -0
- data/ext/zstdlib/zstd-1.3.8/zlibWrapper/gzguts.h +227 -0
- data/ext/zstdlib/zstd-1.3.8/zlibWrapper/gzlib.c +640 -0
- data/ext/zstdlib/zstd-1.3.8/zlibWrapper/gzread.c +670 -0
- data/ext/zstdlib/zstd-1.3.8/zlibWrapper/gzwrite.c +671 -0
- data/ext/zstdlib/zstd-1.3.8/zlibWrapper/zstd_zlibwrapper.c +1105 -0
- data/ext/zstdlib/zstd-1.3.8/zlibWrapper/zstd_zlibwrapper.h +88 -0
- data/ext/zstdlib/zstd.mk +14 -0
- data/lib/2.2/zstdlib.so +0 -0
- data/lib/2.3/zstdlib.so +0 -0
- data/lib/2.4/zstdlib.so +0 -0
- data/lib/2.5/zstdlib.so +0 -0
- data/lib/2.6/zstdlib.so +0 -0
- data/lib/zstdlib.rb +6 -0
- data/test/zstdlib_test.rb +21 -0
- metadata +205 -0
@@ -0,0 +1,128 @@
|
|
1
|
+
/* header created automatically with -DGEN_TREES_H */
|
2
|
+
|
3
|
+
local const ct_data static_ltree[L_CODES+2] = {
|
4
|
+
{{ 12},{ 8}}, {{140},{ 8}}, {{ 76},{ 8}}, {{204},{ 8}}, {{ 44},{ 8}},
|
5
|
+
{{172},{ 8}}, {{108},{ 8}}, {{236},{ 8}}, {{ 28},{ 8}}, {{156},{ 8}},
|
6
|
+
{{ 92},{ 8}}, {{220},{ 8}}, {{ 60},{ 8}}, {{188},{ 8}}, {{124},{ 8}},
|
7
|
+
{{252},{ 8}}, {{ 2},{ 8}}, {{130},{ 8}}, {{ 66},{ 8}}, {{194},{ 8}},
|
8
|
+
{{ 34},{ 8}}, {{162},{ 8}}, {{ 98},{ 8}}, {{226},{ 8}}, {{ 18},{ 8}},
|
9
|
+
{{146},{ 8}}, {{ 82},{ 8}}, {{210},{ 8}}, {{ 50},{ 8}}, {{178},{ 8}},
|
10
|
+
{{114},{ 8}}, {{242},{ 8}}, {{ 10},{ 8}}, {{138},{ 8}}, {{ 74},{ 8}},
|
11
|
+
{{202},{ 8}}, {{ 42},{ 8}}, {{170},{ 8}}, {{106},{ 8}}, {{234},{ 8}},
|
12
|
+
{{ 26},{ 8}}, {{154},{ 8}}, {{ 90},{ 8}}, {{218},{ 8}}, {{ 58},{ 8}},
|
13
|
+
{{186},{ 8}}, {{122},{ 8}}, {{250},{ 8}}, {{ 6},{ 8}}, {{134},{ 8}},
|
14
|
+
{{ 70},{ 8}}, {{198},{ 8}}, {{ 38},{ 8}}, {{166},{ 8}}, {{102},{ 8}},
|
15
|
+
{{230},{ 8}}, {{ 22},{ 8}}, {{150},{ 8}}, {{ 86},{ 8}}, {{214},{ 8}},
|
16
|
+
{{ 54},{ 8}}, {{182},{ 8}}, {{118},{ 8}}, {{246},{ 8}}, {{ 14},{ 8}},
|
17
|
+
{{142},{ 8}}, {{ 78},{ 8}}, {{206},{ 8}}, {{ 46},{ 8}}, {{174},{ 8}},
|
18
|
+
{{110},{ 8}}, {{238},{ 8}}, {{ 30},{ 8}}, {{158},{ 8}}, {{ 94},{ 8}},
|
19
|
+
{{222},{ 8}}, {{ 62},{ 8}}, {{190},{ 8}}, {{126},{ 8}}, {{254},{ 8}},
|
20
|
+
{{ 1},{ 8}}, {{129},{ 8}}, {{ 65},{ 8}}, {{193},{ 8}}, {{ 33},{ 8}},
|
21
|
+
{{161},{ 8}}, {{ 97},{ 8}}, {{225},{ 8}}, {{ 17},{ 8}}, {{145},{ 8}},
|
22
|
+
{{ 81},{ 8}}, {{209},{ 8}}, {{ 49},{ 8}}, {{177},{ 8}}, {{113},{ 8}},
|
23
|
+
{{241},{ 8}}, {{ 9},{ 8}}, {{137},{ 8}}, {{ 73},{ 8}}, {{201},{ 8}},
|
24
|
+
{{ 41},{ 8}}, {{169},{ 8}}, {{105},{ 8}}, {{233},{ 8}}, {{ 25},{ 8}},
|
25
|
+
{{153},{ 8}}, {{ 89},{ 8}}, {{217},{ 8}}, {{ 57},{ 8}}, {{185},{ 8}},
|
26
|
+
{{121},{ 8}}, {{249},{ 8}}, {{ 5},{ 8}}, {{133},{ 8}}, {{ 69},{ 8}},
|
27
|
+
{{197},{ 8}}, {{ 37},{ 8}}, {{165},{ 8}}, {{101},{ 8}}, {{229},{ 8}},
|
28
|
+
{{ 21},{ 8}}, {{149},{ 8}}, {{ 85},{ 8}}, {{213},{ 8}}, {{ 53},{ 8}},
|
29
|
+
{{181},{ 8}}, {{117},{ 8}}, {{245},{ 8}}, {{ 13},{ 8}}, {{141},{ 8}},
|
30
|
+
{{ 77},{ 8}}, {{205},{ 8}}, {{ 45},{ 8}}, {{173},{ 8}}, {{109},{ 8}},
|
31
|
+
{{237},{ 8}}, {{ 29},{ 8}}, {{157},{ 8}}, {{ 93},{ 8}}, {{221},{ 8}},
|
32
|
+
{{ 61},{ 8}}, {{189},{ 8}}, {{125},{ 8}}, {{253},{ 8}}, {{ 19},{ 9}},
|
33
|
+
{{275},{ 9}}, {{147},{ 9}}, {{403},{ 9}}, {{ 83},{ 9}}, {{339},{ 9}},
|
34
|
+
{{211},{ 9}}, {{467},{ 9}}, {{ 51},{ 9}}, {{307},{ 9}}, {{179},{ 9}},
|
35
|
+
{{435},{ 9}}, {{115},{ 9}}, {{371},{ 9}}, {{243},{ 9}}, {{499},{ 9}},
|
36
|
+
{{ 11},{ 9}}, {{267},{ 9}}, {{139},{ 9}}, {{395},{ 9}}, {{ 75},{ 9}},
|
37
|
+
{{331},{ 9}}, {{203},{ 9}}, {{459},{ 9}}, {{ 43},{ 9}}, {{299},{ 9}},
|
38
|
+
{{171},{ 9}}, {{427},{ 9}}, {{107},{ 9}}, {{363},{ 9}}, {{235},{ 9}},
|
39
|
+
{{491},{ 9}}, {{ 27},{ 9}}, {{283},{ 9}}, {{155},{ 9}}, {{411},{ 9}},
|
40
|
+
{{ 91},{ 9}}, {{347},{ 9}}, {{219},{ 9}}, {{475},{ 9}}, {{ 59},{ 9}},
|
41
|
+
{{315},{ 9}}, {{187},{ 9}}, {{443},{ 9}}, {{123},{ 9}}, {{379},{ 9}},
|
42
|
+
{{251},{ 9}}, {{507},{ 9}}, {{ 7},{ 9}}, {{263},{ 9}}, {{135},{ 9}},
|
43
|
+
{{391},{ 9}}, {{ 71},{ 9}}, {{327},{ 9}}, {{199},{ 9}}, {{455},{ 9}},
|
44
|
+
{{ 39},{ 9}}, {{295},{ 9}}, {{167},{ 9}}, {{423},{ 9}}, {{103},{ 9}},
|
45
|
+
{{359},{ 9}}, {{231},{ 9}}, {{487},{ 9}}, {{ 23},{ 9}}, {{279},{ 9}},
|
46
|
+
{{151},{ 9}}, {{407},{ 9}}, {{ 87},{ 9}}, {{343},{ 9}}, {{215},{ 9}},
|
47
|
+
{{471},{ 9}}, {{ 55},{ 9}}, {{311},{ 9}}, {{183},{ 9}}, {{439},{ 9}},
|
48
|
+
{{119},{ 9}}, {{375},{ 9}}, {{247},{ 9}}, {{503},{ 9}}, {{ 15},{ 9}},
|
49
|
+
{{271},{ 9}}, {{143},{ 9}}, {{399},{ 9}}, {{ 79},{ 9}}, {{335},{ 9}},
|
50
|
+
{{207},{ 9}}, {{463},{ 9}}, {{ 47},{ 9}}, {{303},{ 9}}, {{175},{ 9}},
|
51
|
+
{{431},{ 9}}, {{111},{ 9}}, {{367},{ 9}}, {{239},{ 9}}, {{495},{ 9}},
|
52
|
+
{{ 31},{ 9}}, {{287},{ 9}}, {{159},{ 9}}, {{415},{ 9}}, {{ 95},{ 9}},
|
53
|
+
{{351},{ 9}}, {{223},{ 9}}, {{479},{ 9}}, {{ 63},{ 9}}, {{319},{ 9}},
|
54
|
+
{{191},{ 9}}, {{447},{ 9}}, {{127},{ 9}}, {{383},{ 9}}, {{255},{ 9}},
|
55
|
+
{{511},{ 9}}, {{ 0},{ 7}}, {{ 64},{ 7}}, {{ 32},{ 7}}, {{ 96},{ 7}},
|
56
|
+
{{ 16},{ 7}}, {{ 80},{ 7}}, {{ 48},{ 7}}, {{112},{ 7}}, {{ 8},{ 7}},
|
57
|
+
{{ 72},{ 7}}, {{ 40},{ 7}}, {{104},{ 7}}, {{ 24},{ 7}}, {{ 88},{ 7}},
|
58
|
+
{{ 56},{ 7}}, {{120},{ 7}}, {{ 4},{ 7}}, {{ 68},{ 7}}, {{ 36},{ 7}},
|
59
|
+
{{100},{ 7}}, {{ 20},{ 7}}, {{ 84},{ 7}}, {{ 52},{ 7}}, {{116},{ 7}},
|
60
|
+
{{ 3},{ 8}}, {{131},{ 8}}, {{ 67},{ 8}}, {{195},{ 8}}, {{ 35},{ 8}},
|
61
|
+
{{163},{ 8}}, {{ 99},{ 8}}, {{227},{ 8}}
|
62
|
+
};
|
63
|
+
|
64
|
+
local const ct_data static_dtree[D_CODES] = {
|
65
|
+
{{ 0},{ 5}}, {{16},{ 5}}, {{ 8},{ 5}}, {{24},{ 5}}, {{ 4},{ 5}},
|
66
|
+
{{20},{ 5}}, {{12},{ 5}}, {{28},{ 5}}, {{ 2},{ 5}}, {{18},{ 5}},
|
67
|
+
{{10},{ 5}}, {{26},{ 5}}, {{ 6},{ 5}}, {{22},{ 5}}, {{14},{ 5}},
|
68
|
+
{{30},{ 5}}, {{ 1},{ 5}}, {{17},{ 5}}, {{ 9},{ 5}}, {{25},{ 5}},
|
69
|
+
{{ 5},{ 5}}, {{21},{ 5}}, {{13},{ 5}}, {{29},{ 5}}, {{ 3},{ 5}},
|
70
|
+
{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}}
|
71
|
+
};
|
72
|
+
|
73
|
+
const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = {
|
74
|
+
0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8,
|
75
|
+
8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10,
|
76
|
+
10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
|
77
|
+
11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
|
78
|
+
12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13,
|
79
|
+
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
|
80
|
+
13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
|
81
|
+
14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
|
82
|
+
14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
|
83
|
+
14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15,
|
84
|
+
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
85
|
+
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
86
|
+
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 16, 17,
|
87
|
+
18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
|
88
|
+
23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
|
89
|
+
24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
|
90
|
+
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
|
91
|
+
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27,
|
92
|
+
27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
|
93
|
+
27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
|
94
|
+
28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
|
95
|
+
28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
|
96
|
+
28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
|
97
|
+
29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
|
98
|
+
29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
|
99
|
+
29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29
|
100
|
+
};
|
101
|
+
|
102
|
+
const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= {
|
103
|
+
0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12,
|
104
|
+
13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16,
|
105
|
+
17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19,
|
106
|
+
19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
|
107
|
+
21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22,
|
108
|
+
22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23,
|
109
|
+
23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
|
110
|
+
24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
|
111
|
+
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
|
112
|
+
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26,
|
113
|
+
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
|
114
|
+
26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
|
115
|
+
27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28
|
116
|
+
};
|
117
|
+
|
118
|
+
local const int base_length[LENGTH_CODES] = {
|
119
|
+
0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56,
|
120
|
+
64, 80, 96, 112, 128, 160, 192, 224, 0
|
121
|
+
};
|
122
|
+
|
123
|
+
local const int base_dist[D_CODES] = {
|
124
|
+
0, 1, 2, 3, 4, 6, 8, 12, 16, 24,
|
125
|
+
32, 48, 64, 96, 128, 192, 256, 384, 512, 768,
|
126
|
+
1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576
|
127
|
+
};
|
128
|
+
|
@@ -0,0 +1,93 @@
|
|
1
|
+
/* uncompr.c -- decompress a memory buffer
|
2
|
+
* Copyright (C) 1995-2003, 2010, 2014, 2016 Jean-loup Gailly, Mark Adler
|
3
|
+
* For conditions of distribution and use, see copyright notice in zlib.h
|
4
|
+
*/
|
5
|
+
|
6
|
+
/* @(#) $Id$ */
|
7
|
+
|
8
|
+
#define ZLIB_INTERNAL
|
9
|
+
#include "zlib.h"
|
10
|
+
|
11
|
+
/* ===========================================================================
|
12
|
+
Decompresses the source buffer into the destination buffer. *sourceLen is
|
13
|
+
the byte length of the source buffer. Upon entry, *destLen is the total size
|
14
|
+
of the destination buffer, which must be large enough to hold the entire
|
15
|
+
uncompressed data. (The size of the uncompressed data must have been saved
|
16
|
+
previously by the compressor and transmitted to the decompressor by some
|
17
|
+
mechanism outside the scope of this compression library.) Upon exit,
|
18
|
+
*destLen is the size of the decompressed data and *sourceLen is the number
|
19
|
+
of source bytes consumed. Upon return, source + *sourceLen points to the
|
20
|
+
first unused input byte.
|
21
|
+
|
22
|
+
uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough
|
23
|
+
memory, Z_BUF_ERROR if there was not enough room in the output buffer, or
|
24
|
+
Z_DATA_ERROR if the input data was corrupted, including if the input data is
|
25
|
+
an incomplete zlib stream.
|
26
|
+
*/
|
27
|
+
int ZEXPORT uncompress2 (dest, destLen, source, sourceLen)
|
28
|
+
Bytef *dest;
|
29
|
+
uLongf *destLen;
|
30
|
+
const Bytef *source;
|
31
|
+
uLong *sourceLen;
|
32
|
+
{
|
33
|
+
z_stream stream;
|
34
|
+
int err;
|
35
|
+
const uInt max = (uInt)-1;
|
36
|
+
uLong len, left;
|
37
|
+
Byte buf[1]; /* for detection of incomplete stream when *destLen == 0 */
|
38
|
+
|
39
|
+
len = *sourceLen;
|
40
|
+
if (*destLen) {
|
41
|
+
left = *destLen;
|
42
|
+
*destLen = 0;
|
43
|
+
}
|
44
|
+
else {
|
45
|
+
left = 1;
|
46
|
+
dest = buf;
|
47
|
+
}
|
48
|
+
|
49
|
+
stream.next_in = (z_const Bytef *)source;
|
50
|
+
stream.avail_in = 0;
|
51
|
+
stream.zalloc = (alloc_func)0;
|
52
|
+
stream.zfree = (free_func)0;
|
53
|
+
stream.opaque = (voidpf)0;
|
54
|
+
|
55
|
+
err = inflateInit(&stream);
|
56
|
+
if (err != Z_OK) return err;
|
57
|
+
|
58
|
+
stream.next_out = dest;
|
59
|
+
stream.avail_out = 0;
|
60
|
+
|
61
|
+
do {
|
62
|
+
if (stream.avail_out == 0) {
|
63
|
+
stream.avail_out = left > (uLong)max ? max : (uInt)left;
|
64
|
+
left -= stream.avail_out;
|
65
|
+
}
|
66
|
+
if (stream.avail_in == 0) {
|
67
|
+
stream.avail_in = len > (uLong)max ? max : (uInt)len;
|
68
|
+
len -= stream.avail_in;
|
69
|
+
}
|
70
|
+
err = inflate(&stream, Z_NO_FLUSH);
|
71
|
+
} while (err == Z_OK);
|
72
|
+
|
73
|
+
*sourceLen -= len + stream.avail_in;
|
74
|
+
if (dest != buf)
|
75
|
+
*destLen = stream.total_out;
|
76
|
+
else if (stream.total_out && err == Z_BUF_ERROR)
|
77
|
+
left = 1;
|
78
|
+
|
79
|
+
inflateEnd(&stream);
|
80
|
+
return err == Z_STREAM_END ? Z_OK :
|
81
|
+
err == Z_NEED_DICT ? Z_DATA_ERROR :
|
82
|
+
err == Z_BUF_ERROR && left + stream.avail_out ? Z_DATA_ERROR :
|
83
|
+
err;
|
84
|
+
}
|
85
|
+
|
86
|
+
int ZEXPORT uncompress (dest, destLen, source, sourceLen)
|
87
|
+
Bytef *dest;
|
88
|
+
uLongf *destLen;
|
89
|
+
const Bytef *source;
|
90
|
+
uLong sourceLen;
|
91
|
+
{
|
92
|
+
return uncompress2(dest, destLen, source, &sourceLen);
|
93
|
+
}
|
@@ -0,0 +1,534 @@
|
|
1
|
+
/* zconf.h -- configuration of the zlib compression library
|
2
|
+
* Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
|
3
|
+
* For conditions of distribution and use, see copyright notice in zlib.h
|
4
|
+
*/
|
5
|
+
|
6
|
+
/* @(#) $Id$ */
|
7
|
+
|
8
|
+
#ifndef ZCONF_H
|
9
|
+
#define ZCONF_H
|
10
|
+
|
11
|
+
/*
|
12
|
+
* If you *really* need a unique prefix for all types and library functions,
|
13
|
+
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
|
14
|
+
* Even better than compiling with -DZ_PREFIX would be to use configure to set
|
15
|
+
* this permanently in zconf.h using "./configure --zprefix".
|
16
|
+
*/
|
17
|
+
#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
|
18
|
+
# define Z_PREFIX_SET
|
19
|
+
|
20
|
+
/* all linked symbols and init macros */
|
21
|
+
# define _dist_code z__dist_code
|
22
|
+
# define _length_code z__length_code
|
23
|
+
# define _tr_align z__tr_align
|
24
|
+
# define _tr_flush_bits z__tr_flush_bits
|
25
|
+
# define _tr_flush_block z__tr_flush_block
|
26
|
+
# define _tr_init z__tr_init
|
27
|
+
# define _tr_stored_block z__tr_stored_block
|
28
|
+
# define _tr_tally z__tr_tally
|
29
|
+
# define adler32 z_adler32
|
30
|
+
# define adler32_combine z_adler32_combine
|
31
|
+
# define adler32_combine64 z_adler32_combine64
|
32
|
+
# define adler32_z z_adler32_z
|
33
|
+
# ifndef Z_SOLO
|
34
|
+
# define compress z_compress
|
35
|
+
# define compress2 z_compress2
|
36
|
+
# define compressBound z_compressBound
|
37
|
+
# endif
|
38
|
+
# define crc32 z_crc32
|
39
|
+
# define crc32_combine z_crc32_combine
|
40
|
+
# define crc32_combine64 z_crc32_combine64
|
41
|
+
# define crc32_z z_crc32_z
|
42
|
+
# define deflate z_deflate
|
43
|
+
# define deflateBound z_deflateBound
|
44
|
+
# define deflateCopy z_deflateCopy
|
45
|
+
# define deflateEnd z_deflateEnd
|
46
|
+
# define deflateGetDictionary z_deflateGetDictionary
|
47
|
+
# define deflateInit z_deflateInit
|
48
|
+
# define deflateInit2 z_deflateInit2
|
49
|
+
# define deflateInit2_ z_deflateInit2_
|
50
|
+
# define deflateInit_ z_deflateInit_
|
51
|
+
# define deflateParams z_deflateParams
|
52
|
+
# define deflatePending z_deflatePending
|
53
|
+
# define deflatePrime z_deflatePrime
|
54
|
+
# define deflateReset z_deflateReset
|
55
|
+
# define deflateResetKeep z_deflateResetKeep
|
56
|
+
# define deflateSetDictionary z_deflateSetDictionary
|
57
|
+
# define deflateSetHeader z_deflateSetHeader
|
58
|
+
# define deflateTune z_deflateTune
|
59
|
+
# define deflate_copyright z_deflate_copyright
|
60
|
+
# define get_crc_table z_get_crc_table
|
61
|
+
# ifndef Z_SOLO
|
62
|
+
# define gz_error z_gz_error
|
63
|
+
# define gz_intmax z_gz_intmax
|
64
|
+
# define gz_strwinerror z_gz_strwinerror
|
65
|
+
# define gzbuffer z_gzbuffer
|
66
|
+
# define gzclearerr z_gzclearerr
|
67
|
+
# define gzclose z_gzclose
|
68
|
+
# define gzclose_r z_gzclose_r
|
69
|
+
# define gzclose_w z_gzclose_w
|
70
|
+
# define gzdirect z_gzdirect
|
71
|
+
# define gzdopen z_gzdopen
|
72
|
+
# define gzeof z_gzeof
|
73
|
+
# define gzerror z_gzerror
|
74
|
+
# define gzflush z_gzflush
|
75
|
+
# define gzfread z_gzfread
|
76
|
+
# define gzfwrite z_gzfwrite
|
77
|
+
# define gzgetc z_gzgetc
|
78
|
+
# define gzgetc_ z_gzgetc_
|
79
|
+
# define gzgets z_gzgets
|
80
|
+
# define gzoffset z_gzoffset
|
81
|
+
# define gzoffset64 z_gzoffset64
|
82
|
+
# define gzopen z_gzopen
|
83
|
+
# define gzopen64 z_gzopen64
|
84
|
+
# ifdef _WIN32
|
85
|
+
# define gzopen_w z_gzopen_w
|
86
|
+
# endif
|
87
|
+
# define gzprintf z_gzprintf
|
88
|
+
# define gzputc z_gzputc
|
89
|
+
# define gzputs z_gzputs
|
90
|
+
# define gzread z_gzread
|
91
|
+
# define gzrewind z_gzrewind
|
92
|
+
# define gzseek z_gzseek
|
93
|
+
# define gzseek64 z_gzseek64
|
94
|
+
# define gzsetparams z_gzsetparams
|
95
|
+
# define gztell z_gztell
|
96
|
+
# define gztell64 z_gztell64
|
97
|
+
# define gzungetc z_gzungetc
|
98
|
+
# define gzvprintf z_gzvprintf
|
99
|
+
# define gzwrite z_gzwrite
|
100
|
+
# endif
|
101
|
+
# define inflate z_inflate
|
102
|
+
# define inflateBack z_inflateBack
|
103
|
+
# define inflateBackEnd z_inflateBackEnd
|
104
|
+
# define inflateBackInit z_inflateBackInit
|
105
|
+
# define inflateBackInit_ z_inflateBackInit_
|
106
|
+
# define inflateCodesUsed z_inflateCodesUsed
|
107
|
+
# define inflateCopy z_inflateCopy
|
108
|
+
# define inflateEnd z_inflateEnd
|
109
|
+
# define inflateGetDictionary z_inflateGetDictionary
|
110
|
+
# define inflateGetHeader z_inflateGetHeader
|
111
|
+
# define inflateInit z_inflateInit
|
112
|
+
# define inflateInit2 z_inflateInit2
|
113
|
+
# define inflateInit2_ z_inflateInit2_
|
114
|
+
# define inflateInit_ z_inflateInit_
|
115
|
+
# define inflateMark z_inflateMark
|
116
|
+
# define inflatePrime z_inflatePrime
|
117
|
+
# define inflateReset z_inflateReset
|
118
|
+
# define inflateReset2 z_inflateReset2
|
119
|
+
# define inflateResetKeep z_inflateResetKeep
|
120
|
+
# define inflateSetDictionary z_inflateSetDictionary
|
121
|
+
# define inflateSync z_inflateSync
|
122
|
+
# define inflateSyncPoint z_inflateSyncPoint
|
123
|
+
# define inflateUndermine z_inflateUndermine
|
124
|
+
# define inflateValidate z_inflateValidate
|
125
|
+
# define inflate_copyright z_inflate_copyright
|
126
|
+
# define inflate_fast z_inflate_fast
|
127
|
+
# define inflate_table z_inflate_table
|
128
|
+
# ifndef Z_SOLO
|
129
|
+
# define uncompress z_uncompress
|
130
|
+
# define uncompress2 z_uncompress2
|
131
|
+
# endif
|
132
|
+
# define zError z_zError
|
133
|
+
# ifndef Z_SOLO
|
134
|
+
# define zcalloc z_zcalloc
|
135
|
+
# define zcfree z_zcfree
|
136
|
+
# endif
|
137
|
+
# define zlibCompileFlags z_zlibCompileFlags
|
138
|
+
# define zlibVersion z_zlibVersion
|
139
|
+
|
140
|
+
/* all zlib typedefs in zlib.h and zconf.h */
|
141
|
+
# define Byte z_Byte
|
142
|
+
# define Bytef z_Bytef
|
143
|
+
# define alloc_func z_alloc_func
|
144
|
+
# define charf z_charf
|
145
|
+
# define free_func z_free_func
|
146
|
+
# ifndef Z_SOLO
|
147
|
+
# define gzFile z_gzFile
|
148
|
+
# endif
|
149
|
+
# define gz_header z_gz_header
|
150
|
+
# define gz_headerp z_gz_headerp
|
151
|
+
# define in_func z_in_func
|
152
|
+
# define intf z_intf
|
153
|
+
# define out_func z_out_func
|
154
|
+
# define uInt z_uInt
|
155
|
+
# define uIntf z_uIntf
|
156
|
+
# define uLong z_uLong
|
157
|
+
# define uLongf z_uLongf
|
158
|
+
# define voidp z_voidp
|
159
|
+
# define voidpc z_voidpc
|
160
|
+
# define voidpf z_voidpf
|
161
|
+
|
162
|
+
/* all zlib structs in zlib.h and zconf.h */
|
163
|
+
# define gz_header_s z_gz_header_s
|
164
|
+
# define internal_state z_internal_state
|
165
|
+
|
166
|
+
#endif
|
167
|
+
|
168
|
+
#if defined(__MSDOS__) && !defined(MSDOS)
|
169
|
+
# define MSDOS
|
170
|
+
#endif
|
171
|
+
#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
|
172
|
+
# define OS2
|
173
|
+
#endif
|
174
|
+
#if defined(_WINDOWS) && !defined(WINDOWS)
|
175
|
+
# define WINDOWS
|
176
|
+
#endif
|
177
|
+
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
|
178
|
+
# ifndef WIN32
|
179
|
+
# define WIN32
|
180
|
+
# endif
|
181
|
+
#endif
|
182
|
+
#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
|
183
|
+
# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
|
184
|
+
# ifndef SYS16BIT
|
185
|
+
# define SYS16BIT
|
186
|
+
# endif
|
187
|
+
# endif
|
188
|
+
#endif
|
189
|
+
|
190
|
+
/*
|
191
|
+
* Compile with -DMAXSEG_64K if the alloc function cannot allocate more
|
192
|
+
* than 64k bytes at a time (needed on systems with 16-bit int).
|
193
|
+
*/
|
194
|
+
#ifdef SYS16BIT
|
195
|
+
# define MAXSEG_64K
|
196
|
+
#endif
|
197
|
+
#ifdef MSDOS
|
198
|
+
# define UNALIGNED_OK
|
199
|
+
#endif
|
200
|
+
|
201
|
+
#ifdef __STDC_VERSION__
|
202
|
+
# ifndef STDC
|
203
|
+
# define STDC
|
204
|
+
# endif
|
205
|
+
# if __STDC_VERSION__ >= 199901L
|
206
|
+
# ifndef STDC99
|
207
|
+
# define STDC99
|
208
|
+
# endif
|
209
|
+
# endif
|
210
|
+
#endif
|
211
|
+
#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
|
212
|
+
# define STDC
|
213
|
+
#endif
|
214
|
+
#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
|
215
|
+
# define STDC
|
216
|
+
#endif
|
217
|
+
#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
|
218
|
+
# define STDC
|
219
|
+
#endif
|
220
|
+
#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
|
221
|
+
# define STDC
|
222
|
+
#endif
|
223
|
+
|
224
|
+
#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
|
225
|
+
# define STDC
|
226
|
+
#endif
|
227
|
+
|
228
|
+
#ifndef STDC
|
229
|
+
# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
|
230
|
+
# define const /* note: need a more gentle solution here */
|
231
|
+
# endif
|
232
|
+
#endif
|
233
|
+
|
234
|
+
#if defined(ZLIB_CONST) && !defined(z_const)
|
235
|
+
# define z_const const
|
236
|
+
#else
|
237
|
+
# define z_const
|
238
|
+
#endif
|
239
|
+
|
240
|
+
#ifdef Z_SOLO
|
241
|
+
typedef unsigned long z_size_t;
|
242
|
+
#else
|
243
|
+
# define z_longlong long long
|
244
|
+
# if defined(NO_SIZE_T)
|
245
|
+
typedef unsigned NO_SIZE_T z_size_t;
|
246
|
+
# elif defined(STDC)
|
247
|
+
# include <stddef.h>
|
248
|
+
typedef size_t z_size_t;
|
249
|
+
# else
|
250
|
+
typedef unsigned long z_size_t;
|
251
|
+
# endif
|
252
|
+
# undef z_longlong
|
253
|
+
#endif
|
254
|
+
|
255
|
+
/* Maximum value for memLevel in deflateInit2 */
|
256
|
+
#ifndef MAX_MEM_LEVEL
|
257
|
+
# ifdef MAXSEG_64K
|
258
|
+
# define MAX_MEM_LEVEL 8
|
259
|
+
# else
|
260
|
+
# define MAX_MEM_LEVEL 9
|
261
|
+
# endif
|
262
|
+
#endif
|
263
|
+
|
264
|
+
/* Maximum value for windowBits in deflateInit2 and inflateInit2.
|
265
|
+
* WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
|
266
|
+
* created by gzip. (Files created by minigzip can still be extracted by
|
267
|
+
* gzip.)
|
268
|
+
*/
|
269
|
+
#ifndef MAX_WBITS
|
270
|
+
# define MAX_WBITS 15 /* 32K LZ77 window */
|
271
|
+
#endif
|
272
|
+
|
273
|
+
/* The memory requirements for deflate are (in bytes):
|
274
|
+
(1 << (windowBits+2)) + (1 << (memLevel+9))
|
275
|
+
that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
|
276
|
+
plus a few kilobytes for small objects. For example, if you want to reduce
|
277
|
+
the default memory requirements from 256K to 128K, compile with
|
278
|
+
make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
|
279
|
+
Of course this will generally degrade compression (there's no free lunch).
|
280
|
+
|
281
|
+
The memory requirements for inflate are (in bytes) 1 << windowBits
|
282
|
+
that is, 32K for windowBits=15 (default value) plus about 7 kilobytes
|
283
|
+
for small objects.
|
284
|
+
*/
|
285
|
+
|
286
|
+
/* Type declarations */
|
287
|
+
|
288
|
+
#ifndef OF /* function prototypes */
|
289
|
+
# ifdef STDC
|
290
|
+
# define OF(args) args
|
291
|
+
# else
|
292
|
+
# define OF(args) ()
|
293
|
+
# endif
|
294
|
+
#endif
|
295
|
+
|
296
|
+
#ifndef Z_ARG /* function prototypes for stdarg */
|
297
|
+
# if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
298
|
+
# define Z_ARG(args) args
|
299
|
+
# else
|
300
|
+
# define Z_ARG(args) ()
|
301
|
+
# endif
|
302
|
+
#endif
|
303
|
+
|
304
|
+
/* The following definitions for FAR are needed only for MSDOS mixed
|
305
|
+
* model programming (small or medium model with some far allocations).
|
306
|
+
* This was tested only with MSC; for other MSDOS compilers you may have
|
307
|
+
* to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
|
308
|
+
* just define FAR to be empty.
|
309
|
+
*/
|
310
|
+
#ifdef SYS16BIT
|
311
|
+
# if defined(M_I86SM) || defined(M_I86MM)
|
312
|
+
/* MSC small or medium model */
|
313
|
+
# define SMALL_MEDIUM
|
314
|
+
# ifdef _MSC_VER
|
315
|
+
# define FAR _far
|
316
|
+
# else
|
317
|
+
# define FAR far
|
318
|
+
# endif
|
319
|
+
# endif
|
320
|
+
# if (defined(__SMALL__) || defined(__MEDIUM__))
|
321
|
+
/* Turbo C small or medium model */
|
322
|
+
# define SMALL_MEDIUM
|
323
|
+
# ifdef __BORLANDC__
|
324
|
+
# define FAR _far
|
325
|
+
# else
|
326
|
+
# define FAR far
|
327
|
+
# endif
|
328
|
+
# endif
|
329
|
+
#endif
|
330
|
+
|
331
|
+
#if defined(WINDOWS) || defined(WIN32)
|
332
|
+
/* If building or using zlib as a DLL, define ZLIB_DLL.
|
333
|
+
* This is not mandatory, but it offers a little performance increase.
|
334
|
+
*/
|
335
|
+
# ifdef ZLIB_DLL
|
336
|
+
# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
|
337
|
+
# ifdef ZLIB_INTERNAL
|
338
|
+
# define ZEXTERN extern __declspec(dllexport)
|
339
|
+
# else
|
340
|
+
# define ZEXTERN extern __declspec(dllimport)
|
341
|
+
# endif
|
342
|
+
# endif
|
343
|
+
# endif /* ZLIB_DLL */
|
344
|
+
/* If building or using zlib with the WINAPI/WINAPIV calling convention,
|
345
|
+
* define ZLIB_WINAPI.
|
346
|
+
* Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
|
347
|
+
*/
|
348
|
+
# ifdef ZLIB_WINAPI
|
349
|
+
# ifdef FAR
|
350
|
+
# undef FAR
|
351
|
+
# endif
|
352
|
+
# include <windows.h>
|
353
|
+
/* No need for _export, use ZLIB.DEF instead. */
|
354
|
+
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
|
355
|
+
# define ZEXPORT WINAPI
|
356
|
+
# ifdef WIN32
|
357
|
+
# define ZEXPORTVA WINAPIV
|
358
|
+
# else
|
359
|
+
# define ZEXPORTVA FAR CDECL
|
360
|
+
# endif
|
361
|
+
# endif
|
362
|
+
#endif
|
363
|
+
|
364
|
+
#if defined (__BEOS__)
|
365
|
+
# ifdef ZLIB_DLL
|
366
|
+
# ifdef ZLIB_INTERNAL
|
367
|
+
# define ZEXPORT __declspec(dllexport)
|
368
|
+
# define ZEXPORTVA __declspec(dllexport)
|
369
|
+
# else
|
370
|
+
# define ZEXPORT __declspec(dllimport)
|
371
|
+
# define ZEXPORTVA __declspec(dllimport)
|
372
|
+
# endif
|
373
|
+
# endif
|
374
|
+
#endif
|
375
|
+
|
376
|
+
#ifndef ZEXTERN
|
377
|
+
# define ZEXTERN extern
|
378
|
+
#endif
|
379
|
+
#ifndef ZEXPORT
|
380
|
+
# define ZEXPORT
|
381
|
+
#endif
|
382
|
+
#ifndef ZEXPORTVA
|
383
|
+
# define ZEXPORTVA
|
384
|
+
#endif
|
385
|
+
|
386
|
+
#ifndef FAR
|
387
|
+
# define FAR
|
388
|
+
#endif
|
389
|
+
|
390
|
+
#if !defined(__MACTYPES__)
|
391
|
+
typedef unsigned char Byte; /* 8 bits */
|
392
|
+
#endif
|
393
|
+
typedef unsigned int uInt; /* 16 bits or more */
|
394
|
+
typedef unsigned long uLong; /* 32 bits or more */
|
395
|
+
|
396
|
+
#ifdef SMALL_MEDIUM
|
397
|
+
/* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
|
398
|
+
# define Bytef Byte FAR
|
399
|
+
#else
|
400
|
+
typedef Byte FAR Bytef;
|
401
|
+
#endif
|
402
|
+
typedef char FAR charf;
|
403
|
+
typedef int FAR intf;
|
404
|
+
typedef uInt FAR uIntf;
|
405
|
+
typedef uLong FAR uLongf;
|
406
|
+
|
407
|
+
#ifdef STDC
|
408
|
+
typedef void const *voidpc;
|
409
|
+
typedef void FAR *voidpf;
|
410
|
+
typedef void *voidp;
|
411
|
+
#else
|
412
|
+
typedef Byte const *voidpc;
|
413
|
+
typedef Byte FAR *voidpf;
|
414
|
+
typedef Byte *voidp;
|
415
|
+
#endif
|
416
|
+
|
417
|
+
#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
|
418
|
+
# include <limits.h>
|
419
|
+
# if (UINT_MAX == 0xffffffffUL)
|
420
|
+
# define Z_U4 unsigned
|
421
|
+
# elif (ULONG_MAX == 0xffffffffUL)
|
422
|
+
# define Z_U4 unsigned long
|
423
|
+
# elif (USHRT_MAX == 0xffffffffUL)
|
424
|
+
# define Z_U4 unsigned short
|
425
|
+
# endif
|
426
|
+
#endif
|
427
|
+
|
428
|
+
#ifdef Z_U4
|
429
|
+
typedef Z_U4 z_crc_t;
|
430
|
+
#else
|
431
|
+
typedef unsigned long z_crc_t;
|
432
|
+
#endif
|
433
|
+
|
434
|
+
#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
|
435
|
+
# define Z_HAVE_UNISTD_H
|
436
|
+
#endif
|
437
|
+
|
438
|
+
#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
|
439
|
+
# define Z_HAVE_STDARG_H
|
440
|
+
#endif
|
441
|
+
|
442
|
+
#ifdef STDC
|
443
|
+
# ifndef Z_SOLO
|
444
|
+
# include <sys/types.h> /* for off_t */
|
445
|
+
# endif
|
446
|
+
#endif
|
447
|
+
|
448
|
+
#if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
449
|
+
# ifndef Z_SOLO
|
450
|
+
# include <stdarg.h> /* for va_list */
|
451
|
+
# endif
|
452
|
+
#endif
|
453
|
+
|
454
|
+
#ifdef _WIN32
|
455
|
+
# ifndef Z_SOLO
|
456
|
+
# include <stddef.h> /* for wchar_t */
|
457
|
+
# endif
|
458
|
+
#endif
|
459
|
+
|
460
|
+
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
|
461
|
+
* "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
|
462
|
+
* though the former does not conform to the LFS document), but considering
|
463
|
+
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
|
464
|
+
* equivalently requesting no 64-bit operations
|
465
|
+
*/
|
466
|
+
#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
|
467
|
+
# undef _LARGEFILE64_SOURCE
|
468
|
+
#endif
|
469
|
+
|
470
|
+
#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
|
471
|
+
# define Z_HAVE_UNISTD_H
|
472
|
+
#endif
|
473
|
+
#ifndef Z_SOLO
|
474
|
+
# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
|
475
|
+
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
|
476
|
+
# ifdef VMS
|
477
|
+
# include <unixio.h> /* for off_t */
|
478
|
+
# endif
|
479
|
+
# ifndef z_off_t
|
480
|
+
# define z_off_t off_t
|
481
|
+
# endif
|
482
|
+
# endif
|
483
|
+
#endif
|
484
|
+
|
485
|
+
#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
|
486
|
+
# define Z_LFS64
|
487
|
+
#endif
|
488
|
+
|
489
|
+
#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
|
490
|
+
# define Z_LARGE64
|
491
|
+
#endif
|
492
|
+
|
493
|
+
#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
|
494
|
+
# define Z_WANT64
|
495
|
+
#endif
|
496
|
+
|
497
|
+
#if !defined(SEEK_SET) && !defined(Z_SOLO)
|
498
|
+
# define SEEK_SET 0 /* Seek from beginning of file. */
|
499
|
+
# define SEEK_CUR 1 /* Seek from current position. */
|
500
|
+
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
|
501
|
+
#endif
|
502
|
+
|
503
|
+
#ifndef z_off_t
|
504
|
+
# define z_off_t long
|
505
|
+
#endif
|
506
|
+
|
507
|
+
#if !defined(_WIN32) && defined(Z_LARGE64)
|
508
|
+
# define z_off64_t off64_t
|
509
|
+
#else
|
510
|
+
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
|
511
|
+
# define z_off64_t __int64
|
512
|
+
# else
|
513
|
+
# define z_off64_t z_off_t
|
514
|
+
# endif
|
515
|
+
#endif
|
516
|
+
|
517
|
+
/* MVS linker does not support external names larger than 8 bytes */
|
518
|
+
#if defined(__MVS__)
|
519
|
+
#pragma map(deflateInit_,"DEIN")
|
520
|
+
#pragma map(deflateInit2_,"DEIN2")
|
521
|
+
#pragma map(deflateEnd,"DEEND")
|
522
|
+
#pragma map(deflateBound,"DEBND")
|
523
|
+
#pragma map(inflateInit_,"ININ")
|
524
|
+
#pragma map(inflateInit2_,"ININ2")
|
525
|
+
#pragma map(inflateEnd,"INEND")
|
526
|
+
#pragma map(inflateSync,"INSY")
|
527
|
+
#pragma map(inflateSetDictionary,"INSEDI")
|
528
|
+
#pragma map(compressBound,"CMBND")
|
529
|
+
#pragma map(inflate_table,"INTABL")
|
530
|
+
#pragma map(inflate_fast,"INFA")
|
531
|
+
#pragma map(inflate_copyright,"INCOPY")
|
532
|
+
#endif
|
533
|
+
|
534
|
+
#endif /* ZCONF_H */
|