@revizly/sharp-libvips-dev 1.0.52 → 1.0.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +2 -0
  2. package/include/brotli/decode.h +409 -0
  3. package/include/brotli/encode.h +505 -0
  4. package/include/brotli/port.h +302 -0
  5. package/include/brotli/shared_dictionary.h +100 -0
  6. package/include/brotli/types.h +83 -0
  7. package/include/expat.h +72 -27
  8. package/include/expat_config.h +3 -7
  9. package/include/expat_external.h +3 -0
  10. package/include/glib-2.0/glib/gutils.h +1 -1
  11. package/include/harfbuzz/hb-version.h +2 -2
  12. package/include/jxl/cms.h +24 -0
  13. package/include/jxl/cms_interface.h +255 -0
  14. package/include/jxl/codestream_header.h +433 -0
  15. package/include/jxl/color_encoding.h +161 -0
  16. package/include/jxl/compressed_icc.h +75 -0
  17. package/include/jxl/decode.h +1475 -0
  18. package/include/jxl/decode_cxx.h +58 -0
  19. package/include/jxl/encode.h +1629 -0
  20. package/include/jxl/encode_cxx.h +58 -0
  21. package/include/jxl/gain_map.h +129 -0
  22. package/include/jxl/jxl_cms_export.h +42 -0
  23. package/include/jxl/jxl_export.h +42 -0
  24. package/include/jxl/jxl_threads_export.h +42 -0
  25. package/include/jxl/memory_manager.h +73 -0
  26. package/include/jxl/parallel_runner.h +164 -0
  27. package/include/jxl/resizable_parallel_runner.h +77 -0
  28. package/include/jxl/resizable_parallel_runner_cxx.h +65 -0
  29. package/include/jxl/stats.h +103 -0
  30. package/include/jxl/thread_parallel_runner.h +71 -0
  31. package/include/jxl/thread_parallel_runner_cxx.h +66 -0
  32. package/include/jxl/types.h +154 -0
  33. package/include/jxl/version.h +44 -0
  34. package/include/libheif/heif_context.h +7 -4
  35. package/include/libheif/heif_encoding.h +5 -0
  36. package/include/libheif/heif_error.h +7 -0
  37. package/include/libheif/heif_image.h +10 -0
  38. package/include/libheif/heif_tiling.h +12 -0
  39. package/include/libheif/heif_version.h +2 -2
  40. package/include/libpng16/png.h +7 -7
  41. package/include/libpng16/pngconf.h +1 -1
  42. package/include/libpng16/pnglibconf.h +1 -1
  43. package/include/png.h +7 -7
  44. package/include/pngconf.h +1 -1
  45. package/include/pnglibconf.h +1 -1
  46. package/include/vips/version.h +1 -1
  47. package/package.json +1 -1
  48. package/versions.json +8 -6
@@ -0,0 +1,302 @@
1
+ /* Copyright 2016 Google Inc. All Rights Reserved.
2
+
3
+ Distributed under MIT license.
4
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
5
+ */
6
+
7
+ /* Macros for compiler / platform specific API declarations. */
8
+
9
+ #ifndef BROTLI_COMMON_PORT_H_
10
+ #define BROTLI_COMMON_PORT_H_
11
+
12
+ /* The following macros were borrowed from https://github.com/nemequ/hedley
13
+ * with permission of original author - Evan Nemerson <evan@nemerson.com> */
14
+
15
+ /* >>> >>> >>> hedley macros */
16
+
17
+ #define BROTLI_MAKE_VERSION(major, minor, revision) \
18
+ (((major) * 1000000) + ((minor) * 1000) + (revision))
19
+
20
+ #if defined(__GNUC__) && defined(__GNUC_PATCHLEVEL__)
21
+ #define BROTLI_GNUC_VERSION \
22
+ BROTLI_MAKE_VERSION(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)
23
+ #elif defined(__GNUC__)
24
+ #define BROTLI_GNUC_VERSION BROTLI_MAKE_VERSION(__GNUC__, __GNUC_MINOR__, 0)
25
+ #endif
26
+
27
+ #if defined(BROTLI_GNUC_VERSION)
28
+ #define BROTLI_GNUC_VERSION_CHECK(major, minor, patch) \
29
+ (BROTLI_GNUC_VERSION >= BROTLI_MAKE_VERSION(major, minor, patch))
30
+ #else
31
+ #define BROTLI_GNUC_VERSION_CHECK(major, minor, patch) (0)
32
+ #endif
33
+
34
+ #if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 140000000)
35
+ #define BROTLI_MSVC_VERSION \
36
+ BROTLI_MAKE_VERSION((_MSC_FULL_VER / 10000000), \
37
+ (_MSC_FULL_VER % 10000000) / 100000, \
38
+ (_MSC_FULL_VER % 100000) / 100)
39
+ #elif defined(_MSC_FULL_VER)
40
+ #define BROTLI_MSVC_VERSION \
41
+ BROTLI_MAKE_VERSION((_MSC_FULL_VER / 1000000), \
42
+ (_MSC_FULL_VER % 1000000) / 10000, \
43
+ (_MSC_FULL_VER % 10000) / 10)
44
+ #elif defined(_MSC_VER)
45
+ #define BROTLI_MSVC_VERSION \
46
+ BROTLI_MAKE_VERSION(_MSC_VER / 100, _MSC_VER % 100, 0)
47
+ #endif
48
+
49
+ #if !defined(_MSC_VER)
50
+ #define BROTLI_MSVC_VERSION_CHECK(major, minor, patch) (0)
51
+ #elif defined(_MSC_VER) && (_MSC_VER >= 1400)
52
+ #define BROTLI_MSVC_VERSION_CHECK(major, minor, patch) \
53
+ (_MSC_FULL_VER >= ((major * 10000000) + (minor * 100000) + (patch)))
54
+ #elif defined(_MSC_VER) && (_MSC_VER >= 1200)
55
+ #define BROTLI_MSVC_VERSION_CHECK(major, minor, patch) \
56
+ (_MSC_FULL_VER >= ((major * 1000000) + (minor * 10000) + (patch)))
57
+ #else
58
+ #define BROTLI_MSVC_VERSION_CHECK(major, minor, patch) \
59
+ (_MSC_VER >= ((major * 100) + (minor)))
60
+ #endif
61
+
62
+ #if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE)
63
+ #define BROTLI_INTEL_VERSION \
64
+ BROTLI_MAKE_VERSION(__INTEL_COMPILER / 100, \
65
+ __INTEL_COMPILER % 100, \
66
+ __INTEL_COMPILER_UPDATE)
67
+ #elif defined(__INTEL_COMPILER)
68
+ #define BROTLI_INTEL_VERSION \
69
+ BROTLI_MAKE_VERSION(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, 0)
70
+ #endif
71
+
72
+ #if defined(BROTLI_INTEL_VERSION)
73
+ #define BROTLI_INTEL_VERSION_CHECK(major, minor, patch) \
74
+ (BROTLI_INTEL_VERSION >= BROTLI_MAKE_VERSION(major, minor, patch))
75
+ #else
76
+ #define BROTLI_INTEL_VERSION_CHECK(major, minor, patch) (0)
77
+ #endif
78
+
79
+ #if defined(__PGI) && \
80
+ defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__)
81
+ #define BROTLI_PGI_VERSION \
82
+ BROTLI_MAKE_VERSION(__PGIC__, __PGIC_MINOR__, __PGIC_PATCHLEVEL__)
83
+ #endif
84
+
85
+ #if defined(BROTLI_PGI_VERSION)
86
+ #define BROTLI_PGI_VERSION_CHECK(major, minor, patch) \
87
+ (BROTLI_PGI_VERSION >= BROTLI_MAKE_VERSION(major, minor, patch))
88
+ #else
89
+ #define BROTLI_PGI_VERSION_CHECK(major, minor, patch) (0)
90
+ #endif
91
+
92
+ #if defined(__SUNPRO_C) && (__SUNPRO_C > 0x1000)
93
+ #define BROTLI_SUNPRO_VERSION \
94
+ BROTLI_MAKE_VERSION( \
95
+ (((__SUNPRO_C >> 16) & 0xf) * 10) + ((__SUNPRO_C >> 12) & 0xf), \
96
+ (((__SUNPRO_C >> 8) & 0xf) * 10) + ((__SUNPRO_C >> 4) & 0xf), \
97
+ (__SUNPRO_C & 0xf) * 10)
98
+ #elif defined(__SUNPRO_C)
99
+ #define BROTLI_SUNPRO_VERSION \
100
+ BROTLI_MAKE_VERSION((__SUNPRO_C >> 8) & 0xf, \
101
+ (__SUNPRO_C >> 4) & 0xf, \
102
+ (__SUNPRO_C) & 0xf)
103
+ #elif defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x1000)
104
+ #define BROTLI_SUNPRO_VERSION \
105
+ BROTLI_MAKE_VERSION( \
106
+ (((__SUNPRO_CC >> 16) & 0xf) * 10) + ((__SUNPRO_CC >> 12) & 0xf), \
107
+ (((__SUNPRO_CC >> 8) & 0xf) * 10) + ((__SUNPRO_CC >> 4) & 0xf), \
108
+ (__SUNPRO_CC & 0xf) * 10)
109
+ #elif defined(__SUNPRO_CC)
110
+ #define BROTLI_SUNPRO_VERSION \
111
+ BROTLI_MAKE_VERSION((__SUNPRO_CC >> 8) & 0xf, \
112
+ (__SUNPRO_CC >> 4) & 0xf, \
113
+ (__SUNPRO_CC) & 0xf)
114
+ #endif
115
+
116
+ #if defined(BROTLI_SUNPRO_VERSION)
117
+ #define BROTLI_SUNPRO_VERSION_CHECK(major, minor, patch) \
118
+ (BROTLI_SUNPRO_VERSION >= BROTLI_MAKE_VERSION(major, minor, patch))
119
+ #else
120
+ #define BROTLI_SUNPRO_VERSION_CHECK(major, minor, patch) (0)
121
+ #endif
122
+
123
+ #if defined(__CC_ARM) && defined(__ARMCOMPILER_VERSION)
124
+ #define BROTLI_ARM_VERSION \
125
+ BROTLI_MAKE_VERSION((__ARMCOMPILER_VERSION / 1000000), \
126
+ (__ARMCOMPILER_VERSION % 1000000) / 10000, \
127
+ (__ARMCOMPILER_VERSION % 10000) / 100)
128
+ #elif defined(__CC_ARM) && defined(__ARMCC_VERSION)
129
+ #define BROTLI_ARM_VERSION \
130
+ BROTLI_MAKE_VERSION((__ARMCC_VERSION / 1000000), \
131
+ (__ARMCC_VERSION % 1000000) / 10000, \
132
+ (__ARMCC_VERSION % 10000) / 100)
133
+ #endif
134
+
135
+ #if defined(BROTLI_ARM_VERSION)
136
+ #define BROTLI_ARM_VERSION_CHECK(major, minor, patch) \
137
+ (BROTLI_ARM_VERSION >= BROTLI_MAKE_VERSION(major, minor, patch))
138
+ #else
139
+ #define BROTLI_ARM_VERSION_CHECK(major, minor, patch) (0)
140
+ #endif
141
+
142
+ #if defined(__ibmxl__)
143
+ #define BROTLI_IBM_VERSION \
144
+ BROTLI_MAKE_VERSION(__ibmxl_version__, \
145
+ __ibmxl_release__, \
146
+ __ibmxl_modification__)
147
+ #elif defined(__xlC__) && defined(__xlC_ver__)
148
+ #define BROTLI_IBM_VERSION \
149
+ BROTLI_MAKE_VERSION(__xlC__ >> 8, __xlC__ & 0xff, (__xlC_ver__ >> 8) & 0xff)
150
+ #elif defined(__xlC__)
151
+ #define BROTLI_IBM_VERSION BROTLI_MAKE_VERSION(__xlC__ >> 8, __xlC__ & 0xff, 0)
152
+ #endif
153
+
154
+ #if defined(BROTLI_IBM_VERSION)
155
+ #define BROTLI_IBM_VERSION_CHECK(major, minor, patch) \
156
+ (BROTLI_IBM_VERSION >= BROTLI_MAKE_VERSION(major, minor, patch))
157
+ #else
158
+ #define BROTLI_IBM_VERSION_CHECK(major, minor, patch) (0)
159
+ #endif
160
+
161
+ #if defined(__TI_COMPILER_VERSION__)
162
+ #define BROTLI_TI_VERSION \
163
+ BROTLI_MAKE_VERSION((__TI_COMPILER_VERSION__ / 1000000), \
164
+ (__TI_COMPILER_VERSION__ % 1000000) / 1000, \
165
+ (__TI_COMPILER_VERSION__ % 1000))
166
+ #endif
167
+
168
+ #if defined(BROTLI_TI_VERSION)
169
+ #define BROTLI_TI_VERSION_CHECK(major, minor, patch) \
170
+ (BROTLI_TI_VERSION >= BROTLI_MAKE_VERSION(major, minor, patch))
171
+ #else
172
+ #define BROTLI_TI_VERSION_CHECK(major, minor, patch) (0)
173
+ #endif
174
+
175
+ #if defined(__IAR_SYSTEMS_ICC__)
176
+ #if __VER__ > 1000
177
+ #define BROTLI_IAR_VERSION \
178
+ BROTLI_MAKE_VERSION((__VER__ / 1000000), \
179
+ (__VER__ / 1000) % 1000, \
180
+ (__VER__ % 1000))
181
+ #else
182
+ #define BROTLI_IAR_VERSION BROTLI_MAKE_VERSION(VER / 100, __VER__ % 100, 0)
183
+ #endif
184
+ #endif
185
+
186
+ #if defined(BROTLI_IAR_VERSION)
187
+ #define BROTLI_IAR_VERSION_CHECK(major, minor, patch) \
188
+ (BROTLI_IAR_VERSION >= BROTLI_MAKE_VERSION(major, minor, patch))
189
+ #else
190
+ #define BROTLI_IAR_VERSION_CHECK(major, minor, patch) (0)
191
+ #endif
192
+
193
+ #if defined(__TINYC__)
194
+ #define BROTLI_TINYC_VERSION \
195
+ BROTLI_MAKE_VERSION(__TINYC__ / 1000, (__TINYC__ / 100) % 10, __TINYC__ % 100)
196
+ #endif
197
+
198
+ #if defined(BROTLI_TINYC_VERSION)
199
+ #define BROTLI_TINYC_VERSION_CHECK(major, minor, patch) \
200
+ (BROTLI_TINYC_VERSION >= BROTLI_MAKE_VERSION(major, minor, patch))
201
+ #else
202
+ #define BROTLI_TINYC_VERSION_CHECK(major, minor, patch) (0)
203
+ #endif
204
+
205
+ #if defined(__has_attribute)
206
+ #define BROTLI_GNUC_HAS_ATTRIBUTE(attribute, major, minor, patch) \
207
+ __has_attribute(attribute)
208
+ #else
209
+ #define BROTLI_GNUC_HAS_ATTRIBUTE(attribute, major, minor, patch) \
210
+ BROTLI_GNUC_VERSION_CHECK(major, minor, patch)
211
+ #endif
212
+
213
+ #if defined(__has_builtin)
214
+ #define BROTLI_GNUC_HAS_BUILTIN(builtin, major, minor, patch) \
215
+ __has_builtin(builtin)
216
+ #else
217
+ #define BROTLI_GNUC_HAS_BUILTIN(builtin, major, minor, patch) \
218
+ BROTLI_GNUC_VERSION_CHECK(major, minor, patch)
219
+ #endif
220
+
221
+ #if defined(__has_feature)
222
+ #define BROTLI_HAS_FEATURE(feature) __has_feature(feature)
223
+ #else
224
+ #define BROTLI_HAS_FEATURE(feature) (0)
225
+ #endif
226
+
227
+ #if defined(_WIN32) || defined(__CYGWIN__)
228
+ #define BROTLI_PUBLIC
229
+ #elif BROTLI_GNUC_VERSION_CHECK(3, 3, 0) || \
230
+ BROTLI_TI_VERSION_CHECK(8, 0, 0) || \
231
+ BROTLI_INTEL_VERSION_CHECK(16, 0, 0) || \
232
+ BROTLI_ARM_VERSION_CHECK(4, 1, 0) || \
233
+ BROTLI_IBM_VERSION_CHECK(13, 1, 0) || \
234
+ BROTLI_SUNPRO_VERSION_CHECK(5, 11, 0) || \
235
+ (BROTLI_TI_VERSION_CHECK(7, 3, 0) && \
236
+ defined(__TI_GNU_ATTRIBUTE_SUPPORT__) && defined(__TI_EABI__))
237
+ #define BROTLI_PUBLIC __attribute__ ((visibility ("default")))
238
+ #else
239
+ #define BROTLI_PUBLIC
240
+ #endif
241
+
242
+ #if defined(_WIN32) || defined(__CYGWIN__)
243
+ #define BROTLI_INTERNAL
244
+ #elif BROTLI_GNUC_VERSION_CHECK(3, 3, 0) || \
245
+ BROTLI_TI_VERSION_CHECK(8, 0, 0) || \
246
+ BROTLI_INTEL_VERSION_CHECK(16, 0, 0) || \
247
+ BROTLI_ARM_VERSION_CHECK(4, 1, 0) || \
248
+ BROTLI_IBM_VERSION_CHECK(13, 1, 0) || \
249
+ BROTLI_SUNPRO_VERSION_CHECK(5, 11, 0) || \
250
+ (BROTLI_TI_VERSION_CHECK(7, 3, 0) && \
251
+ defined(__TI_GNU_ATTRIBUTE_SUPPORT__) && defined(__TI_EABI__))
252
+ #define BROTLI_INTERNAL __attribute__ ((visibility ("hidden")))
253
+ #else
254
+ #define BROTLI_INTERNAL
255
+ #endif
256
+
257
+ #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \
258
+ !defined(__STDC_NO_VLA__) && !defined(__cplusplus) && \
259
+ !defined(__PGI) && !defined(__PGIC__) && !defined(__TINYC__) && \
260
+ !defined(__clang__)
261
+ #define BROTLI_ARRAY_PARAM(name) (name)
262
+ #else
263
+ #define BROTLI_ARRAY_PARAM(name)
264
+ #endif
265
+
266
+ /* <<< <<< <<< end of hedley macros. */
267
+
268
+ #if defined(BROTLI_SHARED_COMPILATION)
269
+ #if defined(_WIN32)
270
+ #if defined(BROTLICOMMON_SHARED_COMPILATION)
271
+ #define BROTLI_COMMON_API __declspec(dllexport)
272
+ #else /* !BROTLICOMMON_SHARED_COMPILATION */
273
+ #define BROTLI_COMMON_API __declspec(dllimport)
274
+ #endif /* BROTLICOMMON_SHARED_COMPILATION */
275
+ #if defined(BROTLIDEC_SHARED_COMPILATION)
276
+ #define BROTLI_DEC_API __declspec(dllexport)
277
+ #else /* !BROTLIDEC_SHARED_COMPILATION */
278
+ #define BROTLI_DEC_API __declspec(dllimport)
279
+ #endif /* BROTLIDEC_SHARED_COMPILATION */
280
+ #if defined(BROTLIENC_SHARED_COMPILATION)
281
+ #define BROTLI_ENC_API __declspec(dllexport)
282
+ #else /* !BROTLIENC_SHARED_COMPILATION */
283
+ #define BROTLI_ENC_API __declspec(dllimport)
284
+ #endif /* BROTLIENC_SHARED_COMPILATION */
285
+ #else /* !_WIN32 */
286
+ #define BROTLI_COMMON_API BROTLI_PUBLIC
287
+ #define BROTLI_DEC_API BROTLI_PUBLIC
288
+ #define BROTLI_ENC_API BROTLI_PUBLIC
289
+ #endif /* _WIN32 */
290
+ #else /* BROTLI_SHARED_COMPILATION */
291
+ #define BROTLI_COMMON_API
292
+ #define BROTLI_DEC_API
293
+ #define BROTLI_ENC_API
294
+ #endif
295
+
296
+ #if defined(BROTLI_BUILD_ENC_EXTRA_API)
297
+ #define BROTLI_ENC_EXTRA_API BROTLI_ENC_API
298
+ #else
299
+ #define BROTLI_ENC_EXTRA_API BROTLI_INTERNAL
300
+ #endif
301
+
302
+ #endif /* BROTLI_COMMON_PORT_H_ */
@@ -0,0 +1,100 @@
1
+ /* Copyright 2017 Google Inc. All Rights Reserved.
2
+
3
+ Distributed under MIT license.
4
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
5
+ */
6
+
7
+ /* (Opaque) Shared Dictionary definition and utilities. */
8
+
9
+ #ifndef BROTLI_COMMON_SHARED_DICTIONARY_H_
10
+ #define BROTLI_COMMON_SHARED_DICTIONARY_H_
11
+
12
+ #include <brotli/port.h>
13
+ #include <brotli/types.h>
14
+
15
+ #if defined(__cplusplus) || defined(c_plusplus)
16
+ extern "C" {
17
+ #endif
18
+
19
+ #define SHARED_BROTLI_MIN_DICTIONARY_WORD_LENGTH 4
20
+ #define SHARED_BROTLI_MAX_DICTIONARY_WORD_LENGTH 31
21
+ #define SHARED_BROTLI_NUM_DICTIONARY_CONTEXTS 64
22
+ #define SHARED_BROTLI_MAX_COMPOUND_DICTS 15
23
+
24
+ /**
25
+ * Opaque structure that holds shared dictionary data.
26
+ *
27
+ * Allocated and initialized with ::BrotliSharedDictionaryCreateInstance.
28
+ * Cleaned up and deallocated with ::BrotliSharedDictionaryDestroyInstance.
29
+ */
30
+ typedef struct BrotliSharedDictionaryStruct BrotliSharedDictionary;
31
+
32
+ /**
33
+ * Input data type for ::BrotliSharedDictionaryAttach.
34
+ */
35
+ typedef enum BrotliSharedDictionaryType {
36
+ /** Raw LZ77 prefix dictionary. */
37
+ BROTLI_SHARED_DICTIONARY_RAW = 0,
38
+ /** Serialized shared dictionary.
39
+ *
40
+ * DO NOT USE: methods accepting this value will fail.
41
+ */
42
+ BROTLI_SHARED_DICTIONARY_SERIALIZED = 1
43
+ } BrotliSharedDictionaryType;
44
+
45
+ /**
46
+ * Creates an instance of ::BrotliSharedDictionary.
47
+ *
48
+ * Fresh instance has default word dictionary and transforms
49
+ * and no LZ77 prefix dictionary.
50
+ *
51
+ * @p alloc_func and @p free_func @b MUST be both zero or both non-zero. In the
52
+ * case they are both zero, default memory allocators are used. @p opaque is
53
+ * passed to @p alloc_func and @p free_func when they are called. @p free_func
54
+ * has to return without doing anything when asked to free a NULL pointer.
55
+ *
56
+ * @param alloc_func custom memory allocation function
57
+ * @param free_func custom memory free function
58
+ * @param opaque custom memory manager handle
59
+ * @returns @c 0 if instance can not be allocated or initialized
60
+ * @returns pointer to initialized ::BrotliSharedDictionary otherwise
61
+ */
62
+ BROTLI_COMMON_API BrotliSharedDictionary* BrotliSharedDictionaryCreateInstance(
63
+ brotli_alloc_func alloc_func, brotli_free_func free_func, void* opaque);
64
+
65
+ /**
66
+ * Deinitializes and frees ::BrotliSharedDictionary instance.
67
+ *
68
+ * @param dict shared dictionary instance to be cleaned up and deallocated
69
+ */
70
+ BROTLI_COMMON_API void BrotliSharedDictionaryDestroyInstance(
71
+ BrotliSharedDictionary* dict);
72
+
73
+ /**
74
+ * Attaches dictionary to a given instance of ::BrotliSharedDictionary.
75
+ *
76
+ * Dictionary to be attached is represented in a serialized format as a region
77
+ * of memory.
78
+ *
79
+ * Provided data it partially referenced by a resulting (compound) dictionary,
80
+ * and should be kept untouched, while at least one compound dictionary uses it.
81
+ * This way memory overhead is kept minimal by the cost of additional resource
82
+ * management.
83
+ *
84
+ * @param dict dictionary to extend
85
+ * @param type type of dictionary to attach
86
+ * @param data_size size of @p data
87
+ * @param data serialized dictionary of type @p type, with at least @p data_size
88
+ * addressable bytes
89
+ * @returns ::BROTLI_TRUE if provided dictionary is successfully attached
90
+ * @returns ::BROTLI_FALSE otherwise
91
+ */
92
+ BROTLI_COMMON_API BROTLI_BOOL BrotliSharedDictionaryAttach(
93
+ BrotliSharedDictionary* dict, BrotliSharedDictionaryType type,
94
+ size_t data_size, const uint8_t data[BROTLI_ARRAY_PARAM(data_size)]);
95
+
96
+ #if defined(__cplusplus) || defined(c_plusplus)
97
+ } /* extern "C" */
98
+ #endif
99
+
100
+ #endif /* BROTLI_COMMON_SHARED_DICTIONARY_H_ */
@@ -0,0 +1,83 @@
1
+ /* Copyright 2013 Google Inc. All Rights Reserved.
2
+
3
+ Distributed under MIT license.
4
+ See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
5
+ */
6
+
7
+ /**
8
+ * @file
9
+ * Common types used in decoder and encoder API.
10
+ */
11
+
12
+ #ifndef BROTLI_COMMON_TYPES_H_
13
+ #define BROTLI_COMMON_TYPES_H_
14
+
15
+ #include <stddef.h> /* IWYU pragma: export */
16
+
17
+ #if defined(_MSC_VER) && (_MSC_VER < 1600)
18
+ typedef __int8 int8_t;
19
+ typedef unsigned __int8 uint8_t;
20
+ typedef __int16 int16_t;
21
+ typedef unsigned __int16 uint16_t;
22
+ typedef __int32 int32_t;
23
+ typedef unsigned __int32 uint32_t;
24
+ typedef unsigned __int64 uint64_t;
25
+ typedef __int64 int64_t;
26
+ #else
27
+ #include <stdint.h> /* IWYU pragma: export */
28
+ #endif /* defined(_MSC_VER) && (_MSC_VER < 1600) */
29
+
30
+ /**
31
+ * A portable @c bool replacement.
32
+ *
33
+ * ::BROTLI_BOOL is a "documentation" type: actually it is @c int, but in API it
34
+ * denotes a type, whose only values are ::BROTLI_TRUE and ::BROTLI_FALSE.
35
+ *
36
+ * ::BROTLI_BOOL values passed to Brotli should either be ::BROTLI_TRUE or
37
+ * ::BROTLI_FALSE, or be a result of ::TO_BROTLI_BOOL macros.
38
+ *
39
+ * ::BROTLI_BOOL values returned by Brotli should not be tested for equality
40
+ * with @c true, @c false, ::BROTLI_TRUE, ::BROTLI_FALSE, but rather should be
41
+ * evaluated, for example: @code{.cpp}
42
+ * if (SomeBrotliFunction(encoder, BROTLI_TRUE) &&
43
+ * !OtherBrotliFunction(decoder, BROTLI_FALSE)) {
44
+ * bool x = !!YetAnotherBrotliFunction(encoder, TO_BROLTI_BOOL(2 * 2 == 4));
45
+ * DoSomething(x);
46
+ * }
47
+ * @endcode
48
+ */
49
+ #define BROTLI_BOOL int
50
+ /** Portable @c true replacement. */
51
+ #define BROTLI_TRUE 1
52
+ /** Portable @c false replacement. */
53
+ #define BROTLI_FALSE 0
54
+ /** @c bool to ::BROTLI_BOOL conversion macros. */
55
+ #define TO_BROTLI_BOOL(X) (!!(X) ? BROTLI_TRUE : BROTLI_FALSE)
56
+
57
+ #define BROTLI_MAKE_UINT64_T(high, low) ((((uint64_t)(high)) << 32) | low)
58
+
59
+ #define BROTLI_UINT32_MAX (~((uint32_t)0))
60
+ #define BROTLI_SIZE_MAX (~((size_t)0))
61
+
62
+ /**
63
+ * Allocating function pointer type.
64
+ *
65
+ * @param opaque custom memory manager handle provided by client
66
+ * @param size requested memory region size; can not be @c 0
67
+ * @returns @c 0 in the case of failure
68
+ * @returns a valid pointer to a memory region of at least @p size bytes
69
+ * long otherwise
70
+ */
71
+ typedef void* (*brotli_alloc_func)(void* opaque, size_t size);
72
+
73
+ /**
74
+ * Deallocating function pointer type.
75
+ *
76
+ * This function @b SHOULD do nothing if @p address is @c 0.
77
+ *
78
+ * @param opaque custom memory manager handle provided by client
79
+ * @param address memory region pointer returned by ::brotli_alloc_func, or @c 0
80
+ */
81
+ typedef void (*brotli_free_func)(void* opaque, void* address);
82
+
83
+ #endif /* BROTLI_COMMON_TYPES_H_ */
package/include/expat.h CHANGED
@@ -48,7 +48,7 @@
48
48
  #ifndef Expat_INCLUDED
49
49
  # define Expat_INCLUDED 1
50
50
 
51
- # include <stdint.h> // for uint8_t
51
+ # include <stdint.h> // for int64_t, uint8_t, uint64_t
52
52
  # include <stdlib.h>
53
53
  # include "expat_external.h"
54
54
 
@@ -140,6 +140,26 @@ enum XML_Error {
140
140
  XML_ERROR_NOT_STARTED,
141
141
  };
142
142
 
143
+ /* Added in 2.9.0. */
144
+ enum XML_Prop_Error {
145
+ XML_PROP_ERROR_NONE = 0, // i.e. success
146
+
147
+ XML_PROP_ERROR_INVALID_KEY = 1, // i.e. the property is not known at all
148
+ XML_PROP_ERROR_INVALID_TYPE = 2, // i.e. the property is known but expects a
149
+ // different type (so a different
150
+ // getter/setter would need to be called)
151
+ XML_PROP_ERROR_INVALID_VALUE = 3, // i.e. the value is invalid (with a setter
152
+ // function) or a NULL-pointer (with a
153
+ // getter function)
154
+
155
+ XML_PROP_ERROR_PARSER_NULL = 4, // i.e. the parser argument is NULL
156
+ XML_PROP_ERROR_PARSER_NOT_ROOT = 5, // i.e. the parser is not a root parser
157
+ // but a subparser (and a root parser is
158
+ // needed)
159
+
160
+ /* potentially more error codes upcoming here */
161
+ };
162
+
143
163
  enum XML_Content_Type {
144
164
  XML_CTYPE_EMPTY = 1,
145
165
  XML_CTYPE_ANY,
@@ -757,29 +777,6 @@ XML_GetSpecifiedAttributeCount(XML_Parser parser);
757
777
  XMLPARSEAPI(int)
758
778
  XML_GetIdAttributeIndex(XML_Parser parser);
759
779
 
760
- # ifdef XML_ATTR_INFO
761
- /* Source file byte offsets for the start and end of attribute names and values.
762
- The value indices are exclusive of surrounding quotes; thus in a UTF-8 source
763
- file an attribute value of "blah" will yield:
764
- info->valueEnd - info->valueStart = 4 bytes.
765
- */
766
- typedef struct {
767
- XML_Index nameStart; /* Offset to beginning of the attribute name. */
768
- XML_Index nameEnd; /* Offset after the attribute name's last byte. */
769
- XML_Index valueStart; /* Offset to beginning of the attribute value. */
770
- XML_Index valueEnd; /* Offset after the attribute value's last byte. */
771
- } XML_AttrInfo;
772
-
773
- /* Returns an array of XML_AttrInfo structures for the attribute/value pairs
774
- passed in last call to the XML_StartElementHandler that were specified
775
- in the start-tag rather than defaulted. Each attribute/value pair counts
776
- as 1; thus the number of entries in the array is
777
- XML_GetSpecifiedAttributeCount(parser) / 2.
778
- */
779
- XMLPARSEAPI(const XML_AttrInfo *)
780
- XML_GetAttributeInfo(XML_Parser parser);
781
- # endif
782
-
783
780
  /* Parses some input. Returns XML_STATUS_ERROR if a fatal error is
784
781
  detected. The last call to XML_Parse must have isFinal true; len
785
782
  may be zero for this call (or any other).
@@ -964,15 +961,24 @@ XML_GetErrorCode(XML_Parser parser);
964
961
  return 0 to indicate an error.
965
962
  Note: XML_GetCurrentByteIndex returns -1 to indicate an error.
966
963
  */
964
+ XML_ATTR_DEPRECATED("please use XML_GetCurrentLineNumber64 instead")
967
965
  XMLPARSEAPI(XML_Size) XML_GetCurrentLineNumber(XML_Parser parser);
966
+ XMLPARSEAPI(uint64_t) XML_GetCurrentLineNumber64(XML_Parser parser);
967
+ XML_ATTR_DEPRECATED("please use XML_GetCurrentColumnNumber64 instead")
968
968
  XMLPARSEAPI(XML_Size) XML_GetCurrentColumnNumber(XML_Parser parser);
969
+ XMLPARSEAPI(uint64_t) XML_GetCurrentColumnNumber64(XML_Parser parser);
970
+ XML_ATTR_DEPRECATED("please use XML_GetCurrentByteIndex64 instead")
969
971
  XMLPARSEAPI(XML_Index) XML_GetCurrentByteIndex(XML_Parser parser);
972
+ XMLPARSEAPI(int64_t) XML_GetCurrentByteIndex64(XML_Parser parser);
970
973
 
971
974
  /* Return the number of bytes in the current event.
972
975
  Returns 0 if the event is in an internal entity.
973
976
  */
977
+ XML_ATTR_DEPRECATED("please use XML_GetCurrentByteCount64 instead")
974
978
  XMLPARSEAPI(int)
975
979
  XML_GetCurrentByteCount(XML_Parser parser);
980
+ XMLPARSEAPI(uint64_t)
981
+ XML_GetCurrentByteCount64(XML_Parser parser);
976
982
 
977
983
  /* If XML_CONTEXT_BYTES is >=1, returns the input buffer, sets
978
984
  the integer pointed to by offset to the offset within this buffer
@@ -984,8 +990,11 @@ XML_GetCurrentByteCount(XML_Parser parser);
984
990
  NOTE: The character pointer returned should not be used outside
985
991
  the handler that makes the call.
986
992
  */
993
+ XML_ATTR_DEPRECATED("please use XML_GetInputContext64 instead")
987
994
  XMLPARSEAPI(const char *)
988
995
  XML_GetInputContext(XML_Parser parser, int *offset, int *size);
996
+ XMLPARSEAPI(const char *)
997
+ XML_GetInputContext64(XML_Parser parser, int64_t *offset, uint64_t *size);
989
998
 
990
999
  /* For backwards compatibility with previous versions. */
991
1000
  # define XML_GetErrorLineNumber XML_GetCurrentLineNumber
@@ -1040,6 +1049,7 @@ enum XML_FeatureEnum {
1040
1049
  XML_FEATURE_UNICODE_WCHAR_T,
1041
1050
  XML_FEATURE_DTD,
1042
1051
  XML_FEATURE_CONTEXT_BYTES,
1052
+ /* Added in Expat 1.95.5, removed in Expat 2.9.0. */
1043
1053
  XML_FEATURE_MIN_SIZE,
1044
1054
  XML_FEATURE_SIZEOF_XML_CHAR,
1045
1055
  XML_FEATURE_SIZEOF_XML_LCHAR,
@@ -1047,7 +1057,7 @@ enum XML_FeatureEnum {
1047
1057
  XML_FEATURE_NS,
1048
1058
  /* Added in Expat 2.0.1. */
1049
1059
  XML_FEATURE_LARGE_SIZE,
1050
- /* Added in Expat 2.1.0. */
1060
+ /* Added in Expat 2.1.0, removed in Expat 2.9.0. */
1051
1061
  XML_FEATURE_ATTR_INFO,
1052
1062
  /* Added in Expat 2.4.0. */
1053
1063
  XML_FEATURE_BILLION_LAUGHS_ATTACK_PROTECTION_MAXIMUM_AMPLIFICATION_DEFAULT,
@@ -1069,6 +1079,41 @@ typedef struct {
1069
1079
  XMLPARSEAPI(const XML_Feature *)
1070
1080
  XML_GetFeatureList(void);
1071
1081
 
1082
+ /* Added in Expat 2.9.0. */
1083
+ enum XML_Parser_Property {
1084
+ # if defined(XML_TESTING)
1085
+ XML_PROP_INVALID = 0,
1086
+ # endif
1087
+ # if XML_GE == 1
1088
+ XML_PROP_ALLOC_TRACKER_ACTIVATION_THRESHOLD = 1, // of type `uint64_t`
1089
+ XML_PROP_ALLOC_TRACKER_MAXIMUM_AMPLIFICATION = 2, // of type `double`
1090
+ XML_PROP_BILLION_LAUGHS_ACTIVATION_THRESHOLD = 3, // of type `uint64_t`
1091
+ XML_PROP_BILLION_LAUGHS_MAXIMUM_AMPLIFICATION = 4, // of type `double`
1092
+ # endif
1093
+ XML_PROP_REPARSE_DEFERRAL_ENABLED = 5, // of type `XML_Bool`
1094
+ /* more properties upcoming here */
1095
+ };
1096
+
1097
+ /* Added in Expat 2.9.0. */
1098
+ XMLPARSEAPI(enum XML_Prop_Error)
1099
+ XML_GetPropertyBool(XML_Parser parser, enum XML_Parser_Property property,
1100
+ XML_Bool *value);
1101
+ XMLPARSEAPI(enum XML_Prop_Error)
1102
+ XML_GetPropertyDouble(XML_Parser parser, enum XML_Parser_Property property,
1103
+ double *value);
1104
+ XMLPARSEAPI(enum XML_Prop_Error)
1105
+ XML_GetPropertyUInt64(XML_Parser parser, enum XML_Parser_Property property,
1106
+ uint64_t *value);
1107
+ XMLPARSEAPI(enum XML_Prop_Error)
1108
+ XML_SetPropertyBool(XML_Parser parser, enum XML_Parser_Property property,
1109
+ XML_Bool value);
1110
+ XMLPARSEAPI(enum XML_Prop_Error)
1111
+ XML_SetPropertyDouble(XML_Parser parser, enum XML_Parser_Property property,
1112
+ double value);
1113
+ XMLPARSEAPI(enum XML_Prop_Error)
1114
+ XML_SetPropertyUInt64(XML_Parser parser, enum XML_Parser_Property property,
1115
+ uint64_t value);
1116
+
1072
1117
  # if defined(XML_DTD) || (defined(XML_GE) && XML_GE == 1)
1073
1118
  /* Added in Expat 2.4.0 for XML_DTD defined and
1074
1119
  * added in Expat 2.6.0 for XML_GE == 1. */
@@ -1101,8 +1146,8 @@ XML_SetReparseDeferralEnabled(XML_Parser parser, XML_Bool enabled);
1101
1146
  See https://semver.org
1102
1147
  */
1103
1148
  # define XML_MAJOR_VERSION 2
1104
- # define XML_MINOR_VERSION 8
1105
- # define XML_MICRO_VERSION 5
1149
+ # define XML_MINOR_VERSION 9
1150
+ # define XML_MICRO_VERSION 0
1106
1151
 
1107
1152
  # ifdef __cplusplus
1108
1153
  }
@@ -83,7 +83,7 @@
83
83
  #define PACKAGE_NAME "expat"
84
84
 
85
85
  /* Define to the full name and version of this package. */
86
- #define PACKAGE_STRING "expat 2.8.5"
86
+ #define PACKAGE_STRING "expat 2.9.0"
87
87
 
88
88
  /* Define to the one symbol short name of this package. */
89
89
  #define PACKAGE_TARNAME "expat"
@@ -92,7 +92,7 @@
92
92
  #define PACKAGE_URL ""
93
93
 
94
94
  /* Define to the version of this package. */
95
- #define PACKAGE_VERSION "2.8.5"
95
+ #define PACKAGE_VERSION "2.9.0"
96
96
 
97
97
  /* Define to 1 if all of the C89 standard headers exist (not just the ones
98
98
  required in a freestanding environment). This macro is provided for
@@ -100,7 +100,7 @@
100
100
  #define STDC_HEADERS 1
101
101
 
102
102
  /* Version number of package */
103
- #define VERSION "2.8.5"
103
+ #define VERSION "2.9.0"
104
104
 
105
105
  /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
106
106
  significant byte first (like Motorola and SPARC, unlike Intel). */
@@ -114,10 +114,6 @@
114
114
  # endif
115
115
  #endif
116
116
 
117
- /* Define to allow retrieving the byte offsets for attribute names and values.
118
- */
119
- /* #undef XML_ATTR_INFO */
120
-
121
117
  /* Define to specify how much context to retain around the current parse
122
118
  point, 0 to disable. */
123
119
  #define XML_CONTEXT_BYTES 1024