zstdlib 0.10.0-x86-mingw32 → 0.12.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +17 -0
- data/ext/zstdlib_c/extconf.rb +9 -4
- data/ext/zstdlib_c/ruby/zlib-3.2/zstdlib.c +5090 -0
- data/ext/zstdlib_c/ruby/zlib-3.3/zstdlib.c +5090 -0
- data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/adler32.c +5 -27
- data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/compress.c +5 -16
- data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/crc32.c +94 -161
- data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/deflate.c +362 -434
- data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/deflate.h +43 -12
- data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/gzclose.c +1 -3
- data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/gzguts.h +13 -18
- data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/gzlib.c +28 -85
- data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/gzread.c +23 -73
- data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/gzwrite.c +19 -65
- data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/infback.c +17 -30
- data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/inffast.c +1 -4
- data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/inffast.h +1 -1
- data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/inflate.c +36 -102
- data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/inftrees.c +6 -11
- data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/inftrees.h +6 -6
- data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/trees.c +290 -355
- data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/uncompr.c +4 -12
- data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/zconf.h +23 -14
- data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/zlib.h +202 -199
- data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/zutil.c +18 -44
- data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/zutil.h +13 -33
- data/ext/zstdlib_c/zstd-1.5.5/lib/common/allocations.h +55 -0
- data/ext/zstdlib_c/zstd-1.5.5/lib/common/bits.h +200 -0
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/common/bitstream.h +19 -60
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/common/compiler.h +26 -3
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/common/cpu.h +1 -1
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/common/debug.c +1 -1
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/common/debug.h +1 -1
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/common/entropy_common.c +12 -40
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/common/error_private.c +9 -2
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/common/error_private.h +1 -1
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/common/fse.h +5 -83
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/common/fse_decompress.c +7 -99
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/common/huf.h +65 -156
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/common/mem.h +39 -46
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/common/pool.c +26 -10
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/common/pool.h +7 -1
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/common/portability_macros.h +22 -3
- data/ext/zstdlib_c/zstd-1.5.5/lib/common/threading.c +176 -0
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/common/threading.h +5 -10
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/common/xxhash.c +2 -2
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/common/xxhash.h +8 -8
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/common/zstd_common.c +1 -36
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/common/zstd_deps.h +1 -1
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/common/zstd_internal.h +17 -118
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/common/zstd_trace.h +3 -3
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/compress/clevels.h +1 -1
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/compress/fse_compress.c +7 -124
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/compress/hist.c +1 -1
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/compress/hist.h +1 -1
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/compress/huf_compress.c +234 -169
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/compress/zstd_compress.c +1243 -538
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/compress/zstd_compress_internal.h +225 -151
- data/ext/zstdlib_c/zstd-1.5.5/lib/compress/zstd_compress_literals.c +235 -0
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/compress/zstd_compress_literals.h +16 -8
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/compress/zstd_compress_sequences.c +3 -3
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/compress/zstd_compress_sequences.h +1 -1
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/compress/zstd_compress_superblock.c +25 -21
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/compress/zstd_compress_superblock.h +1 -1
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/compress/zstd_cwksp.h +128 -62
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/compress/zstd_double_fast.c +95 -33
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/compress/zstd_double_fast.h +3 -2
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/compress/zstd_fast.c +433 -148
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/compress/zstd_fast.h +3 -2
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/compress/zstd_lazy.c +398 -345
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/compress/zstd_lazy.h +4 -2
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/compress/zstd_ldm.c +5 -5
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/compress/zstd_ldm.h +1 -1
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/compress/zstd_ldm_geartab.h +1 -1
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/compress/zstd_opt.c +106 -80
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/compress/zstd_opt.h +1 -1
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/compress/zstdmt_compress.c +17 -9
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/compress/zstdmt_compress.h +1 -1
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/decompress/huf_decompress.c +434 -441
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/decompress/huf_decompress_amd64.S +30 -39
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/decompress/zstd_ddict.c +4 -4
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/decompress/zstd_ddict.h +1 -1
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/decompress/zstd_decompress.c +205 -80
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/decompress/zstd_decompress_block.c +201 -81
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/decompress/zstd_decompress_block.h +6 -1
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/decompress/zstd_decompress_internal.h +4 -2
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/zdict.h +53 -31
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/zstd.h +580 -135
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/lib/zstd_errors.h +27 -8
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/zlibWrapper/gzclose.c +1 -1
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/zlibWrapper/gzcompatibility.h +8 -8
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/zlibWrapper/gzguts.h +10 -10
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/zlibWrapper/gzlib.c +3 -3
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/zlibWrapper/gzread.c +10 -10
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/zlibWrapper/gzwrite.c +5 -5
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/zlibWrapper/zstd_zlibwrapper.c +46 -44
- data/ext/zstdlib_c/{zstd-1.5.2 → zstd-1.5.5}/zlibWrapper/zstd_zlibwrapper.h +4 -1
- data/lib/2.4/zstdlib_c.so +0 -0
- data/lib/2.5/zstdlib_c.so +0 -0
- data/lib/2.6/zstdlib_c.so +0 -0
- data/lib/2.7/zstdlib_c.so +0 -0
- data/lib/3.0/zstdlib_c.so +0 -0
- data/lib/3.1/zstdlib_c.so +0 -0
- data/lib/3.2/zstdlib_c.so +0 -0
- data/lib/3.3/zstdlib_c.so +0 -0
- metadata +111 -105
- data/ext/zstdlib_c/zstd-1.5.2/lib/common/threading.c +0 -122
- data/ext/zstdlib_c/zstd-1.5.2/lib/compress/zstd_compress_literals.c +0 -159
- /data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/crc32.h +0 -0
- /data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/inffixed.h +0 -0
- /data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/inflate.h +0 -0
- /data/ext/zstdlib_c/{zlib-1.2.12 → zlib-1.3.1}/trees.h +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* Copyright (c)
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
5
|
* This source code is licensed under both the BSD-style license (found in the
|
@@ -20,19 +20,31 @@ extern "C" {
|
|
20
20
|
|
21
21
|
|
22
22
|
/* ===== ZSTDERRORLIB_API : control library symbols visibility ===== */
|
23
|
-
#ifndef
|
24
|
-
|
25
|
-
#
|
23
|
+
#ifndef ZSTDERRORLIB_VISIBLE
|
24
|
+
/* Backwards compatibility with old macro name */
|
25
|
+
# ifdef ZSTDERRORLIB_VISIBILITY
|
26
|
+
# define ZSTDERRORLIB_VISIBLE ZSTDERRORLIB_VISIBILITY
|
27
|
+
# elif defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__MINGW32__)
|
28
|
+
# define ZSTDERRORLIB_VISIBLE __attribute__ ((visibility ("default")))
|
26
29
|
# else
|
27
|
-
# define
|
30
|
+
# define ZSTDERRORLIB_VISIBLE
|
28
31
|
# endif
|
29
32
|
#endif
|
33
|
+
|
34
|
+
#ifndef ZSTDERRORLIB_HIDDEN
|
35
|
+
# if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__MINGW32__)
|
36
|
+
# define ZSTDERRORLIB_HIDDEN __attribute__ ((visibility ("hidden")))
|
37
|
+
# else
|
38
|
+
# define ZSTDERRORLIB_HIDDEN
|
39
|
+
# endif
|
40
|
+
#endif
|
41
|
+
|
30
42
|
#if defined(ZSTD_DLL_EXPORT) && (ZSTD_DLL_EXPORT==1)
|
31
|
-
# define ZSTDERRORLIB_API __declspec(dllexport)
|
43
|
+
# define ZSTDERRORLIB_API __declspec(dllexport) ZSTDERRORLIB_VISIBLE
|
32
44
|
#elif defined(ZSTD_DLL_IMPORT) && (ZSTD_DLL_IMPORT==1)
|
33
|
-
# define ZSTDERRORLIB_API __declspec(dllimport)
|
45
|
+
# define ZSTDERRORLIB_API __declspec(dllimport) ZSTDERRORLIB_VISIBLE /* It isn't required but allows to generate better code, saving a function pointer load from the IAT and an indirect jump.*/
|
34
46
|
#else
|
35
|
-
# define ZSTDERRORLIB_API
|
47
|
+
# define ZSTDERRORLIB_API ZSTDERRORLIB_VISIBLE
|
36
48
|
#endif
|
37
49
|
|
38
50
|
/*-*********************************************
|
@@ -58,14 +70,17 @@ typedef enum {
|
|
58
70
|
ZSTD_error_frameParameter_windowTooLarge = 16,
|
59
71
|
ZSTD_error_corruption_detected = 20,
|
60
72
|
ZSTD_error_checksum_wrong = 22,
|
73
|
+
ZSTD_error_literals_headerWrong = 24,
|
61
74
|
ZSTD_error_dictionary_corrupted = 30,
|
62
75
|
ZSTD_error_dictionary_wrong = 32,
|
63
76
|
ZSTD_error_dictionaryCreation_failed = 34,
|
64
77
|
ZSTD_error_parameter_unsupported = 40,
|
78
|
+
ZSTD_error_parameter_combination_unsupported = 41,
|
65
79
|
ZSTD_error_parameter_outOfBound = 42,
|
66
80
|
ZSTD_error_tableLog_tooLarge = 44,
|
67
81
|
ZSTD_error_maxSymbolValue_tooLarge = 46,
|
68
82
|
ZSTD_error_maxSymbolValue_tooSmall = 48,
|
83
|
+
ZSTD_error_stabilityCondition_notRespected = 50,
|
69
84
|
ZSTD_error_stage_wrong = 60,
|
70
85
|
ZSTD_error_init_missing = 62,
|
71
86
|
ZSTD_error_memory_allocation = 64,
|
@@ -73,11 +88,15 @@ typedef enum {
|
|
73
88
|
ZSTD_error_dstSize_tooSmall = 70,
|
74
89
|
ZSTD_error_srcSize_wrong = 72,
|
75
90
|
ZSTD_error_dstBuffer_null = 74,
|
91
|
+
ZSTD_error_noForwardProgress_destFull = 80,
|
92
|
+
ZSTD_error_noForwardProgress_inputEmpty = 82,
|
76
93
|
/* following error codes are __NOT STABLE__, they can be removed or changed in future versions */
|
77
94
|
ZSTD_error_frameIndex_tooLarge = 100,
|
78
95
|
ZSTD_error_seekableIO = 102,
|
79
96
|
ZSTD_error_dstBuffer_wrong = 104,
|
80
97
|
ZSTD_error_srcBuffer_wrong = 105,
|
98
|
+
ZSTD_error_sequenceProducer_failed = 106,
|
99
|
+
ZSTD_error_externalSequences_invalid = 107,
|
81
100
|
ZSTD_error_maxCode = 120 /* never EVER use this value directly, it can change in future versions! Use ZSTD_isError() instead */
|
82
101
|
} ZSTD_ErrorCode;
|
83
102
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
/* gzclose.c -- zlib gzclose() function
|
5
5
|
* Copyright (C) 2004, 2010 Mark Adler
|
6
|
-
* For conditions of distribution and use, see
|
6
|
+
* For conditions of distribution and use, see https://www.zlib.net/zlib_license.html
|
7
7
|
*/
|
8
8
|
|
9
9
|
#include "gzguts.h"
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* Copyright (c)
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
5
|
* This source code is licensed under both the BSD-style license (found in the
|
@@ -11,10 +11,10 @@
|
|
11
11
|
|
12
12
|
|
13
13
|
#if ZLIB_VERNUM <= 0x1240
|
14
|
-
ZEXTERN int ZEXPORT gzclose_r
|
15
|
-
ZEXTERN int ZEXPORT gzclose_w
|
16
|
-
ZEXTERN int ZEXPORT gzbuffer
|
17
|
-
ZEXTERN z_off_t ZEXPORT gzoffset
|
14
|
+
ZEXTERN int ZEXPORT gzclose_r _Z_OF((gzFile file));
|
15
|
+
ZEXTERN int ZEXPORT gzclose_w _Z_OF((gzFile file));
|
16
|
+
ZEXTERN int ZEXPORT gzbuffer _Z_OF((gzFile file, unsigned size));
|
17
|
+
ZEXTERN z_off_t ZEXPORT gzoffset _Z_OF((gzFile file));
|
18
18
|
|
19
19
|
#if !defined(_WIN32) && defined(Z_LARGE64)
|
20
20
|
# define z_off64_t off64_t
|
@@ -40,7 +40,7 @@ struct gzFile_s {
|
|
40
40
|
#if ZLIB_VERNUM <= 0x1270
|
41
41
|
#if defined(_WIN32) && !defined(Z_SOLO)
|
42
42
|
# include <stddef.h> /* for wchar_t */
|
43
|
-
ZEXTERN gzFile ZEXPORT gzopen_w
|
43
|
+
ZEXTERN gzFile ZEXPORT gzopen_w _Z_OF((const wchar_t *path,
|
44
44
|
const char *mode));
|
45
45
|
#endif
|
46
46
|
#endif
|
@@ -61,8 +61,8 @@ ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path,
|
|
61
61
|
# endif
|
62
62
|
# undef z_longlong
|
63
63
|
#endif
|
64
|
-
ZEXTERN z_size_t ZEXPORT gzfread
|
64
|
+
ZEXTERN z_size_t ZEXPORT gzfread _Z_OF((voidp buf, z_size_t size, z_size_t nitems,
|
65
65
|
gzFile file));
|
66
|
-
ZEXTERN z_size_t ZEXPORT gzfwrite
|
66
|
+
ZEXTERN z_size_t ZEXPORT gzfwrite _Z_OF((voidpc buf, z_size_t size,
|
67
67
|
z_size_t nitems, gzFile file));
|
68
68
|
#endif
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
/* gzguts.h -- zlib internal header definitions for gz* operations
|
6
6
|
* Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler
|
7
|
-
* For conditions of distribution and use, see
|
7
|
+
* For conditions of distribution and use, see https://www.zlib.net/zlib_license.html
|
8
8
|
*/
|
9
9
|
|
10
10
|
#ifdef _LARGEFILE64_SOURCE
|
@@ -126,8 +126,8 @@
|
|
126
126
|
|
127
127
|
/* gz* functions always use library allocation functions */
|
128
128
|
#ifndef STDC
|
129
|
-
extern voidp malloc
|
130
|
-
extern void free
|
129
|
+
extern voidp malloc _Z_OF((uInt size));
|
130
|
+
extern void free _Z_OF((voidpf ptr));
|
131
131
|
#endif
|
132
132
|
|
133
133
|
/* get errno and strerror definition */
|
@@ -145,10 +145,10 @@
|
|
145
145
|
|
146
146
|
/* provide prototypes for these when building zlib without LFS */
|
147
147
|
#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0
|
148
|
-
ZEXTERN gzFile ZEXPORT gzopen64
|
149
|
-
ZEXTERN z_off64_t ZEXPORT gzseek64
|
150
|
-
ZEXTERN z_off64_t ZEXPORT gztell64
|
151
|
-
ZEXTERN z_off64_t ZEXPORT gzoffset64
|
148
|
+
ZEXTERN gzFile ZEXPORT gzopen64 _Z_OF((const char *, const char *));
|
149
|
+
ZEXTERN z_off64_t ZEXPORT gzseek64 _Z_OF((gzFile, z_off64_t, int));
|
150
|
+
ZEXTERN z_off64_t ZEXPORT gztell64 _Z_OF((gzFile));
|
151
|
+
ZEXTERN z_off64_t ZEXPORT gzoffset64 _Z_OF((gzFile));
|
152
152
|
#endif
|
153
153
|
|
154
154
|
/* default memLevel */
|
@@ -213,9 +213,9 @@ typedef union {
|
|
213
213
|
} gz_statep;
|
214
214
|
|
215
215
|
/* shared functions */
|
216
|
-
void ZLIB_INTERNAL gz_error
|
216
|
+
void ZLIB_INTERNAL gz_error _Z_OF((gz_statep, int, const char *));
|
217
217
|
#if defined UNDER_CE
|
218
|
-
char ZLIB_INTERNAL *gz_strwinerror
|
218
|
+
char ZLIB_INTERNAL *gz_strwinerror _Z_OF((DWORD error));
|
219
219
|
#endif
|
220
220
|
|
221
221
|
/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
|
@@ -224,6 +224,6 @@ char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error));
|
|
224
224
|
#ifdef INT_MAX
|
225
225
|
# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX)
|
226
226
|
#else
|
227
|
-
unsigned ZLIB_INTERNAL gz_intmax
|
227
|
+
unsigned ZLIB_INTERNAL gz_intmax _Z_OF((void));
|
228
228
|
# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax())
|
229
229
|
#endif
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
/* gzlib.c -- zlib functions common to reading and writing gzip files
|
5
5
|
* Copyright (C) 2004-2017 Mark Adler
|
6
|
-
* For conditions of distribution and use, see
|
6
|
+
* For conditions of distribution and use, see https://www.zlib.net/zlib_license.html
|
7
7
|
*/
|
8
8
|
|
9
9
|
#include "gzguts.h"
|
@@ -19,8 +19,8 @@
|
|
19
19
|
#endif
|
20
20
|
|
21
21
|
/* Local functions */
|
22
|
-
local void gz_reset
|
23
|
-
local gzFile gz_open
|
22
|
+
local void gz_reset _Z_OF((gz_statep));
|
23
|
+
local gzFile gz_open _Z_OF((const void *, int, const char *));
|
24
24
|
|
25
25
|
#if defined UNDER_CE
|
26
26
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
/* gzread.c -- zlib functions for reading gzip files
|
5
5
|
* Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler
|
6
|
-
* For conditions of distribution and use, see
|
6
|
+
* For conditions of distribution and use, see https://www.zlib.net/zlib_license.html
|
7
7
|
*/
|
8
8
|
|
9
9
|
#include "gzguts.h"
|
@@ -17,13 +17,13 @@
|
|
17
17
|
|
18
18
|
|
19
19
|
/* Local functions */
|
20
|
-
local int gz_load
|
21
|
-
local int gz_avail
|
22
|
-
local int gz_look
|
23
|
-
local int gz_decomp
|
24
|
-
local int gz_fetch
|
25
|
-
local int gz_skip
|
26
|
-
local z_size_t gz_read
|
20
|
+
local int gz_load _Z_OF((gz_statep, unsigned char *, unsigned, unsigned *));
|
21
|
+
local int gz_avail _Z_OF((gz_statep));
|
22
|
+
local int gz_look _Z_OF((gz_statep));
|
23
|
+
local int gz_decomp _Z_OF((gz_statep));
|
24
|
+
local int gz_fetch _Z_OF((gz_statep));
|
25
|
+
local int gz_skip _Z_OF((gz_statep, z_off64_t));
|
26
|
+
local z_size_t gz_read _Z_OF((gz_statep, voidp, z_size_t));
|
27
27
|
|
28
28
|
/* Use read() to load a buffer -- return -1 on error, otherwise 0. Read from
|
29
29
|
state.state->fd, and update state.state->eof, state.state->err, and state.state->msg as appropriate.
|
@@ -464,8 +464,8 @@ z_size_t ZEXPORT gzfread(buf, size, nitems, file)
|
|
464
464
|
#endif
|
465
465
|
|
466
466
|
#if ZLIB_VERNUM <= 0x1250
|
467
|
-
ZEXTERN int ZEXPORT gzgetc
|
468
|
-
ZEXTERN int ZEXPORT gzgetc_
|
467
|
+
ZEXTERN int ZEXPORT gzgetc _Z_OF((gzFile file));
|
468
|
+
ZEXTERN int ZEXPORT gzgetc_ _Z_OF((gzFile file));
|
469
469
|
#endif
|
470
470
|
|
471
471
|
int ZEXPORT gzgetc(file)
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
/* gzwrite.c -- zlib functions for writing gzip files
|
5
5
|
* Copyright (C) 2004-2017 Mark Adler
|
6
|
-
* For conditions of distribution and use, see
|
6
|
+
* For conditions of distribution and use, see https://www.zlib.net/zlib_license.html
|
7
7
|
*/
|
8
8
|
|
9
9
|
#include <assert.h>
|
@@ -11,10 +11,10 @@
|
|
11
11
|
#include "gzguts.h"
|
12
12
|
|
13
13
|
/* Local functions */
|
14
|
-
local int gz_init
|
15
|
-
local int gz_comp
|
16
|
-
local int gz_zero
|
17
|
-
local z_size_t gz_write
|
14
|
+
local int gz_init _Z_OF((gz_statep));
|
15
|
+
local int gz_comp _Z_OF((gz_statep, int));
|
16
|
+
local int gz_zero _Z_OF((gz_statep, z_off64_t));
|
17
|
+
local z_size_t gz_write _Z_OF((gz_statep, voidpc, z_size_t));
|
18
18
|
|
19
19
|
/* Initialize state for writing a gzip file. Mark initialization by setting
|
20
20
|
state.state->size to non-zero. Return -1 on a memory allocation failure, or 0 on
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* Copyright (c)
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
5
|
* This source code is licensed under both the BSD-style license (found in the
|
@@ -101,7 +101,7 @@ ZWRAP_decompress_type ZWRAP_getDecompressionType(void) { return g_ZWRAPdecompres
|
|
101
101
|
|
102
102
|
const char * zstdVersion(void) { return ZSTD_VERSION_STRING; }
|
103
103
|
|
104
|
-
ZEXTERN const char * ZEXPORT z_zlibVersion
|
104
|
+
ZEXTERN const char * ZEXPORT z_zlibVersion _Z_OF((void)) { return zlibVersion(); }
|
105
105
|
|
106
106
|
static void* ZWRAP_allocFunction(void* opaque, size_t size)
|
107
107
|
{
|
@@ -260,7 +260,7 @@ static struct internal_state* convert_into_sis(void* ptr)
|
|
260
260
|
return (struct internal_state*) ptr;
|
261
261
|
}
|
262
262
|
|
263
|
-
ZEXTERN int ZEXPORT z_deflateInit_
|
263
|
+
ZEXTERN int ZEXPORT z_deflateInit_ _Z_OF((z_streamp strm, int level,
|
264
264
|
const char *version, int stream_size))
|
265
265
|
{
|
266
266
|
ZWRAP_CCtx* zwc;
|
@@ -287,7 +287,7 @@ ZEXTERN int ZEXPORT z_deflateInit_ OF((z_streamp strm, int level,
|
|
287
287
|
}
|
288
288
|
|
289
289
|
|
290
|
-
ZEXTERN int ZEXPORT z_deflateInit2_
|
290
|
+
ZEXTERN int ZEXPORT z_deflateInit2_ _Z_OF((z_streamp strm, int level, int method,
|
291
291
|
int windowBits, int memLevel,
|
292
292
|
int strategy, const char *version,
|
293
293
|
int stream_size))
|
@@ -319,7 +319,7 @@ int ZWRAP_deflateReset_keepDict(z_streamp strm)
|
|
319
319
|
}
|
320
320
|
|
321
321
|
|
322
|
-
ZEXTERN int ZEXPORT z_deflateReset
|
322
|
+
ZEXTERN int ZEXPORT z_deflateReset _Z_OF((z_streamp strm))
|
323
323
|
{
|
324
324
|
LOG_WRAPPERC("- deflateReset\n");
|
325
325
|
if (!g_ZWRAP_useZSTDcompression)
|
@@ -334,7 +334,7 @@ ZEXTERN int ZEXPORT z_deflateReset OF((z_streamp strm))
|
|
334
334
|
}
|
335
335
|
|
336
336
|
|
337
|
-
ZEXTERN int ZEXPORT z_deflateSetDictionary
|
337
|
+
ZEXTERN int ZEXPORT z_deflateSetDictionary _Z_OF((z_streamp strm,
|
338
338
|
const Bytef *dictionary,
|
339
339
|
uInt dictLength))
|
340
340
|
{
|
@@ -359,7 +359,7 @@ ZEXTERN int ZEXPORT z_deflateSetDictionary OF((z_streamp strm,
|
|
359
359
|
}
|
360
360
|
|
361
361
|
|
362
|
-
ZEXTERN int ZEXPORT z_deflate
|
362
|
+
ZEXTERN int ZEXPORT z_deflate _Z_OF((z_streamp strm, int flush))
|
363
363
|
{
|
364
364
|
ZWRAP_CCtx* zwc;
|
365
365
|
|
@@ -465,7 +465,7 @@ ZEXTERN int ZEXPORT z_deflate OF((z_streamp strm, int flush))
|
|
465
465
|
}
|
466
466
|
|
467
467
|
|
468
|
-
ZEXTERN int ZEXPORT z_deflateEnd
|
468
|
+
ZEXTERN int ZEXPORT z_deflateEnd _Z_OF((z_streamp strm))
|
469
469
|
{
|
470
470
|
if (!g_ZWRAP_useZSTDcompression) {
|
471
471
|
LOG_WRAPPERC("- deflateEnd\n");
|
@@ -483,7 +483,7 @@ ZEXTERN int ZEXPORT z_deflateEnd OF((z_streamp strm))
|
|
483
483
|
}
|
484
484
|
|
485
485
|
|
486
|
-
ZEXTERN uLong ZEXPORT z_deflateBound
|
486
|
+
ZEXTERN uLong ZEXPORT z_deflateBound _Z_OF((z_streamp strm,
|
487
487
|
uLong sourceLen))
|
488
488
|
{
|
489
489
|
if (!g_ZWRAP_useZSTDcompression)
|
@@ -493,7 +493,7 @@ ZEXTERN uLong ZEXPORT z_deflateBound OF((z_streamp strm,
|
|
493
493
|
}
|
494
494
|
|
495
495
|
|
496
|
-
ZEXTERN int ZEXPORT z_deflateParams
|
496
|
+
ZEXTERN int ZEXPORT z_deflateParams _Z_OF((z_streamp strm,
|
497
497
|
int level,
|
498
498
|
int strategy))
|
499
499
|
{
|
@@ -594,7 +594,7 @@ static int ZWRAPD_finishWithErrorMsg(z_streamp strm, char* message)
|
|
594
594
|
}
|
595
595
|
|
596
596
|
|
597
|
-
ZEXTERN int ZEXPORT z_inflateInit_
|
597
|
+
ZEXTERN int ZEXPORT z_inflateInit_ _Z_OF((z_streamp strm,
|
598
598
|
const char* version, int stream_size))
|
599
599
|
{
|
600
600
|
if (g_ZWRAPdecompressionType == ZWRAP_FORCE_ZLIB) {
|
@@ -623,7 +623,7 @@ ZEXTERN int ZEXPORT z_inflateInit_ OF((z_streamp strm,
|
|
623
623
|
}
|
624
624
|
|
625
625
|
|
626
|
-
ZEXTERN int ZEXPORT z_inflateInit2_
|
626
|
+
ZEXTERN int ZEXPORT z_inflateInit2_ _Z_OF((z_streamp strm, int windowBits,
|
627
627
|
const char *version, int stream_size))
|
628
628
|
{
|
629
629
|
if (g_ZWRAPdecompressionType == ZWRAP_FORCE_ZLIB) {
|
@@ -660,7 +660,7 @@ int ZWRAP_inflateReset_keepDict(z_streamp strm)
|
|
660
660
|
}
|
661
661
|
|
662
662
|
|
663
|
-
ZEXTERN int ZEXPORT z_inflateReset
|
663
|
+
ZEXTERN int ZEXPORT z_inflateReset _Z_OF((z_streamp strm))
|
664
664
|
{
|
665
665
|
LOG_WRAPPERD("- inflateReset\n");
|
666
666
|
if (g_ZWRAPdecompressionType == ZWRAP_FORCE_ZLIB || !strm->reserved)
|
@@ -678,7 +678,7 @@ ZEXTERN int ZEXPORT z_inflateReset OF((z_streamp strm))
|
|
678
678
|
|
679
679
|
|
680
680
|
#if ZLIB_VERNUM >= 0x1240
|
681
|
-
ZEXTERN int ZEXPORT z_inflateReset2
|
681
|
+
ZEXTERN int ZEXPORT z_inflateReset2 _Z_OF((z_streamp strm,
|
682
682
|
int windowBits))
|
683
683
|
{
|
684
684
|
if (g_ZWRAPdecompressionType == ZWRAP_FORCE_ZLIB || !strm->reserved)
|
@@ -696,7 +696,7 @@ ZEXTERN int ZEXPORT z_inflateReset2 OF((z_streamp strm,
|
|
696
696
|
#endif
|
697
697
|
|
698
698
|
|
699
|
-
ZEXTERN int ZEXPORT z_inflateSetDictionary
|
699
|
+
ZEXTERN int ZEXPORT z_inflateSetDictionary _Z_OF((z_streamp strm,
|
700
700
|
const Bytef *dictionary,
|
701
701
|
uInt dictLength))
|
702
702
|
{
|
@@ -706,8 +706,10 @@ ZEXTERN int ZEXPORT z_inflateSetDictionary OF((z_streamp strm,
|
|
706
706
|
|
707
707
|
{ ZWRAP_DCtx* const zwd = (ZWRAP_DCtx*) strm->state;
|
708
708
|
if (zwd == NULL || zwd->zbd == NULL) return Z_STREAM_ERROR;
|
709
|
-
{ size_t const
|
710
|
-
if (ZSTD_isError(
|
709
|
+
{ size_t const resetErr = ZSTD_DCtx_reset(zwd->zbd, ZSTD_reset_session_only);
|
710
|
+
if (ZSTD_isError(resetErr)) return ZWRAPD_finishWithError(zwd, strm, 0); }
|
711
|
+
{ size_t const loadErr = ZSTD_DCtx_loadDictionary(zwd->zbd, dictionary, dictLength);
|
712
|
+
if (ZSTD_isError(loadErr)) return ZWRAPD_finishWithError(zwd, strm, 0); }
|
711
713
|
zwd->decompState = ZWRAP_useReset;
|
712
714
|
|
713
715
|
if (zwd->totalInBytes == ZSTD_HEADERSIZE) {
|
@@ -730,7 +732,7 @@ ZEXTERN int ZEXPORT z_inflateSetDictionary OF((z_streamp strm,
|
|
730
732
|
}
|
731
733
|
|
732
734
|
|
733
|
-
ZEXTERN int ZEXPORT z_inflate
|
735
|
+
ZEXTERN int ZEXPORT z_inflate _Z_OF((z_streamp strm, int flush))
|
734
736
|
{
|
735
737
|
ZWRAP_DCtx* zwd;
|
736
738
|
|
@@ -926,7 +928,7 @@ error:
|
|
926
928
|
}
|
927
929
|
|
928
930
|
|
929
|
-
ZEXTERN int ZEXPORT z_inflateEnd
|
931
|
+
ZEXTERN int ZEXPORT z_inflateEnd _Z_OF((z_streamp strm))
|
930
932
|
{
|
931
933
|
if (g_ZWRAPdecompressionType == ZWRAP_FORCE_ZLIB || !strm->reserved)
|
932
934
|
return inflateEnd(strm);
|
@@ -943,7 +945,7 @@ ZEXTERN int ZEXPORT z_inflateEnd OF((z_streamp strm))
|
|
943
945
|
}
|
944
946
|
|
945
947
|
|
946
|
-
ZEXTERN int ZEXPORT z_inflateSync
|
948
|
+
ZEXTERN int ZEXPORT z_inflateSync _Z_OF((z_streamp strm))
|
947
949
|
{
|
948
950
|
if (g_ZWRAPdecompressionType == ZWRAP_FORCE_ZLIB || !strm->reserved) {
|
949
951
|
return inflateSync(strm);
|
@@ -955,7 +957,7 @@ ZEXTERN int ZEXPORT z_inflateSync OF((z_streamp strm))
|
|
955
957
|
|
956
958
|
|
957
959
|
/* Advanced compression functions */
|
958
|
-
ZEXTERN int ZEXPORT z_deflateCopy
|
960
|
+
ZEXTERN int ZEXPORT z_deflateCopy _Z_OF((z_streamp dest,
|
959
961
|
z_streamp source))
|
960
962
|
{
|
961
963
|
if (!g_ZWRAP_useZSTDcompression)
|
@@ -964,7 +966,7 @@ ZEXTERN int ZEXPORT z_deflateCopy OF((z_streamp dest,
|
|
964
966
|
}
|
965
967
|
|
966
968
|
|
967
|
-
ZEXTERN int ZEXPORT z_deflateTune
|
969
|
+
ZEXTERN int ZEXPORT z_deflateTune _Z_OF((z_streamp strm,
|
968
970
|
int good_length,
|
969
971
|
int max_lazy,
|
970
972
|
int nice_length,
|
@@ -977,7 +979,7 @@ ZEXTERN int ZEXPORT z_deflateTune OF((z_streamp strm,
|
|
977
979
|
|
978
980
|
|
979
981
|
#if ZLIB_VERNUM >= 0x1260
|
980
|
-
ZEXTERN int ZEXPORT z_deflatePending
|
982
|
+
ZEXTERN int ZEXPORT z_deflatePending _Z_OF((z_streamp strm,
|
981
983
|
unsigned *pending,
|
982
984
|
int *bits))
|
983
985
|
{
|
@@ -988,7 +990,7 @@ ZEXTERN int ZEXPORT z_deflatePending OF((z_streamp strm,
|
|
988
990
|
#endif
|
989
991
|
|
990
992
|
|
991
|
-
ZEXTERN int ZEXPORT z_deflatePrime
|
993
|
+
ZEXTERN int ZEXPORT z_deflatePrime _Z_OF((z_streamp strm,
|
992
994
|
int bits,
|
993
995
|
int value))
|
994
996
|
{
|
@@ -998,7 +1000,7 @@ ZEXTERN int ZEXPORT z_deflatePrime OF((z_streamp strm,
|
|
998
1000
|
}
|
999
1001
|
|
1000
1002
|
|
1001
|
-
ZEXTERN int ZEXPORT z_deflateSetHeader
|
1003
|
+
ZEXTERN int ZEXPORT z_deflateSetHeader _Z_OF((z_streamp strm,
|
1002
1004
|
gz_headerp head))
|
1003
1005
|
{
|
1004
1006
|
if (!g_ZWRAP_useZSTDcompression)
|
@@ -1011,7 +1013,7 @@ ZEXTERN int ZEXPORT z_deflateSetHeader OF((z_streamp strm,
|
|
1011
1013
|
|
1012
1014
|
/* Advanced decompression functions */
|
1013
1015
|
#if ZLIB_VERNUM >= 0x1280
|
1014
|
-
ZEXTERN int ZEXPORT z_inflateGetDictionary
|
1016
|
+
ZEXTERN int ZEXPORT z_inflateGetDictionary _Z_OF((z_streamp strm,
|
1015
1017
|
Bytef *dictionary,
|
1016
1018
|
uInt *dictLength))
|
1017
1019
|
{
|
@@ -1022,7 +1024,7 @@ ZEXTERN int ZEXPORT z_inflateGetDictionary OF((z_streamp strm,
|
|
1022
1024
|
#endif
|
1023
1025
|
|
1024
1026
|
|
1025
|
-
ZEXTERN int ZEXPORT z_inflateCopy
|
1027
|
+
ZEXTERN int ZEXPORT z_inflateCopy _Z_OF((z_streamp dest,
|
1026
1028
|
z_streamp source))
|
1027
1029
|
{
|
1028
1030
|
if (g_ZWRAPdecompressionType == ZWRAP_FORCE_ZLIB || !source->reserved)
|
@@ -1032,7 +1034,7 @@ ZEXTERN int ZEXPORT z_inflateCopy OF((z_streamp dest,
|
|
1032
1034
|
|
1033
1035
|
|
1034
1036
|
#if ZLIB_VERNUM >= 0x1240
|
1035
|
-
ZEXTERN long ZEXPORT z_inflateMark
|
1037
|
+
ZEXTERN long ZEXPORT z_inflateMark _Z_OF((z_streamp strm))
|
1036
1038
|
{
|
1037
1039
|
if (g_ZWRAPdecompressionType == ZWRAP_FORCE_ZLIB || !strm->reserved)
|
1038
1040
|
return inflateMark(strm);
|
@@ -1041,7 +1043,7 @@ ZEXTERN long ZEXPORT z_inflateMark OF((z_streamp strm))
|
|
1041
1043
|
#endif
|
1042
1044
|
|
1043
1045
|
|
1044
|
-
ZEXTERN int ZEXPORT z_inflatePrime
|
1046
|
+
ZEXTERN int ZEXPORT z_inflatePrime _Z_OF((z_streamp strm,
|
1045
1047
|
int bits,
|
1046
1048
|
int value))
|
1047
1049
|
{
|
@@ -1051,7 +1053,7 @@ ZEXTERN int ZEXPORT z_inflatePrime OF((z_streamp strm,
|
|
1051
1053
|
}
|
1052
1054
|
|
1053
1055
|
|
1054
|
-
ZEXTERN int ZEXPORT z_inflateGetHeader
|
1056
|
+
ZEXTERN int ZEXPORT z_inflateGetHeader _Z_OF((z_streamp strm,
|
1055
1057
|
gz_headerp head))
|
1056
1058
|
{
|
1057
1059
|
if (g_ZWRAPdecompressionType == ZWRAP_FORCE_ZLIB || !strm->reserved)
|
@@ -1060,7 +1062,7 @@ ZEXTERN int ZEXPORT z_inflateGetHeader OF((z_streamp strm,
|
|
1060
1062
|
}
|
1061
1063
|
|
1062
1064
|
|
1063
|
-
ZEXTERN int ZEXPORT z_inflateBackInit_
|
1065
|
+
ZEXTERN int ZEXPORT z_inflateBackInit_ _Z_OF((z_streamp strm, int windowBits,
|
1064
1066
|
unsigned char FAR *window,
|
1065
1067
|
const char *version,
|
1066
1068
|
int stream_size))
|
@@ -1071,7 +1073,7 @@ ZEXTERN int ZEXPORT z_inflateBackInit_ OF((z_streamp strm, int windowBits,
|
|
1071
1073
|
}
|
1072
1074
|
|
1073
1075
|
|
1074
|
-
ZEXTERN int ZEXPORT z_inflateBack
|
1076
|
+
ZEXTERN int ZEXPORT z_inflateBack _Z_OF((z_streamp strm,
|
1075
1077
|
in_func in, void FAR *in_desc,
|
1076
1078
|
out_func out, void FAR *out_desc))
|
1077
1079
|
{
|
@@ -1081,7 +1083,7 @@ ZEXTERN int ZEXPORT z_inflateBack OF((z_streamp strm,
|
|
1081
1083
|
}
|
1082
1084
|
|
1083
1085
|
|
1084
|
-
ZEXTERN int ZEXPORT z_inflateBackEnd
|
1086
|
+
ZEXTERN int ZEXPORT z_inflateBackEnd _Z_OF((z_streamp strm))
|
1085
1087
|
{
|
1086
1088
|
if (g_ZWRAPdecompressionType == ZWRAP_FORCE_ZLIB || !strm->reserved)
|
1087
1089
|
return inflateBackEnd(strm);
|
@@ -1089,14 +1091,14 @@ ZEXTERN int ZEXPORT z_inflateBackEnd OF((z_streamp strm))
|
|
1089
1091
|
}
|
1090
1092
|
|
1091
1093
|
|
1092
|
-
ZEXTERN uLong ZEXPORT z_zlibCompileFlags
|
1094
|
+
ZEXTERN uLong ZEXPORT z_zlibCompileFlags _Z_OF((void)) { return zlibCompileFlags(); }
|
1093
1095
|
|
1094
1096
|
|
1095
1097
|
|
1096
1098
|
/* === utility functions === */
|
1097
1099
|
#ifndef Z_SOLO
|
1098
1100
|
|
1099
|
-
ZEXTERN int ZEXPORT z_compress
|
1101
|
+
ZEXTERN int ZEXPORT z_compress _Z_OF((Bytef *dest, uLongf *destLen,
|
1100
1102
|
const Bytef *source, uLong sourceLen))
|
1101
1103
|
{
|
1102
1104
|
if (!g_ZWRAP_useZSTDcompression)
|
@@ -1115,7 +1117,7 @@ ZEXTERN int ZEXPORT z_compress OF((Bytef *dest, uLongf *destLen,
|
|
1115
1117
|
}
|
1116
1118
|
|
1117
1119
|
|
1118
|
-
ZEXTERN int ZEXPORT z_compress2
|
1120
|
+
ZEXTERN int ZEXPORT z_compress2 _Z_OF((Bytef *dest, uLongf *destLen,
|
1119
1121
|
const Bytef *source, uLong sourceLen,
|
1120
1122
|
int level))
|
1121
1123
|
{
|
@@ -1131,7 +1133,7 @@ ZEXTERN int ZEXPORT z_compress2 OF((Bytef *dest, uLongf *destLen,
|
|
1131
1133
|
}
|
1132
1134
|
|
1133
1135
|
|
1134
|
-
ZEXTERN uLong ZEXPORT z_compressBound
|
1136
|
+
ZEXTERN uLong ZEXPORT z_compressBound _Z_OF((uLong sourceLen))
|
1135
1137
|
{
|
1136
1138
|
if (!g_ZWRAP_useZSTDcompression)
|
1137
1139
|
return compressBound(sourceLen);
|
@@ -1140,7 +1142,7 @@ ZEXTERN uLong ZEXPORT z_compressBound OF((uLong sourceLen))
|
|
1140
1142
|
}
|
1141
1143
|
|
1142
1144
|
|
1143
|
-
ZEXTERN int ZEXPORT z_uncompress
|
1145
|
+
ZEXTERN int ZEXPORT z_uncompress _Z_OF((Bytef *dest, uLongf *destLen,
|
1144
1146
|
const Bytef *source, uLong sourceLen))
|
1145
1147
|
{
|
1146
1148
|
if (!ZSTD_isFrame(source, sourceLen))
|
@@ -1159,24 +1161,24 @@ ZEXTERN int ZEXPORT z_uncompress OF((Bytef *dest, uLongf *destLen,
|
|
1159
1161
|
|
1160
1162
|
/* checksum functions */
|
1161
1163
|
|
1162
|
-
ZEXTERN uLong ZEXPORT z_adler32
|
1164
|
+
ZEXTERN uLong ZEXPORT z_adler32 _Z_OF((uLong adler, const Bytef *buf, uInt len))
|
1163
1165
|
{
|
1164
1166
|
return adler32(adler, buf, len);
|
1165
1167
|
}
|
1166
1168
|
|
1167
|
-
ZEXTERN uLong ZEXPORT z_crc32
|
1169
|
+
ZEXTERN uLong ZEXPORT z_crc32 _Z_OF((uLong crc, const Bytef *buf, uInt len))
|
1168
1170
|
{
|
1169
1171
|
return crc32(crc, buf, len);
|
1170
1172
|
}
|
1171
1173
|
|
1172
1174
|
|
1173
1175
|
#if ZLIB_VERNUM >= 0x12B0
|
1174
|
-
ZEXTERN uLong ZEXPORT z_adler32_z
|
1176
|
+
ZEXTERN uLong ZEXPORT z_adler32_z _Z_OF((uLong adler, const Bytef *buf, z_size_t len))
|
1175
1177
|
{
|
1176
1178
|
return adler32_z(adler, buf, len);
|
1177
1179
|
}
|
1178
1180
|
|
1179
|
-
ZEXTERN uLong ZEXPORT z_crc32_z
|
1181
|
+
ZEXTERN uLong ZEXPORT z_crc32_z _Z_OF((uLong crc, const Bytef *buf, z_size_t len))
|
1180
1182
|
{
|
1181
1183
|
return crc32_z(crc, buf, len);
|
1182
1184
|
}
|
@@ -1184,14 +1186,14 @@ ZEXTERN uLong ZEXPORT z_crc32_z OF((uLong crc, const Bytef *buf, z_size_t len))
|
|
1184
1186
|
|
1185
1187
|
|
1186
1188
|
#if ZLIB_VERNUM >= 0x1270
|
1187
|
-
ZEXTERN const z_crc_t FAR * ZEXPORT z_get_crc_table
|
1189
|
+
ZEXTERN const z_crc_t FAR * ZEXPORT z_get_crc_table _Z_OF((void))
|
1188
1190
|
{
|
1189
1191
|
return get_crc_table();
|
1190
1192
|
}
|
1191
1193
|
#endif
|
1192
1194
|
|
1193
1195
|
/* Error function */
|
1194
|
-
ZEXTERN const char * ZEXPORT z_zError
|
1196
|
+
ZEXTERN const char * ZEXPORT z_zError _Z_OF((int err))
|
1195
1197
|
{
|
1196
1198
|
/* Just use zlib Error function */
|
1197
1199
|
return zError(err);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* Copyright (c)
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
3
3
|
* All rights reserved.
|
4
4
|
*
|
5
5
|
* This source code is licensed under both the BSD-style license (found in the
|
@@ -25,6 +25,9 @@ extern "C" {
|
|
25
25
|
#define z_const
|
26
26
|
#endif
|
27
27
|
|
28
|
+
#if !defined(_Z_OF)
|
29
|
+
#define _Z_OF OF
|
30
|
+
#endif
|
28
31
|
|
29
32
|
/* returns a string with version of zstd library */
|
30
33
|
const char * zstdVersion(void);
|
data/lib/2.4/zstdlib_c.so
CHANGED
Binary file
|
data/lib/2.5/zstdlib_c.so
CHANGED
Binary file
|
data/lib/2.6/zstdlib_c.so
CHANGED
Binary file
|
data/lib/2.7/zstdlib_c.so
CHANGED
Binary file
|
data/lib/3.0/zstdlib_c.so
CHANGED
Binary file
|
data/lib/3.1/zstdlib_c.so
CHANGED
Binary file
|
Binary file
|
Binary file
|