/src/ghostpdl/base/sbrotlic.c
Line | Count | Source |
1 | | /* Copyright (C) 2025 Artifex Software, Inc. |
2 | | All Rights Reserved. |
3 | | |
4 | | This software is provided AS-IS with no warranty, either express or |
5 | | implied. |
6 | | |
7 | | This software is distributed under license and may not be copied, |
8 | | modified or distributed except as expressly authorized under the terms |
9 | | of the license contained in the file LICENSE in this distribution. |
10 | | |
11 | | Refer to licensing information at http://www.artifex.com or contact |
12 | | Artifex Software, Inc., 39 Mesa Street, Suite 108A, San Francisco, |
13 | | CA 94129, USA, for further information. |
14 | | */ |
15 | | |
16 | | |
17 | | /* Code common to brotli encoding and decoding streams */ |
18 | | #include "std.h" |
19 | | #include "gserrors.h" |
20 | | #include "gstypes.h" |
21 | | #include "gsmemory.h" |
22 | | #include "gsstruct.h" |
23 | | #include "strimpl.h" |
24 | | #include "sbrotlix.h" |
25 | | |
26 | | #if defined(ENABLE_BROTLI) && ENABLE_BROTLI==1 |
27 | | /* Provide brotli-compatible allocation and freeing functions. */ |
28 | | void * |
29 | | s_brotli_alloc(void *zmem, size_t size) |
30 | 0 | { |
31 | 0 | gs_memory_t *mem = zmem; |
32 | 0 | return gs_alloc_bytes(mem, size, "s_brotli_alloc"); |
33 | 0 | } |
34 | | |
35 | | void |
36 | | s_brotli_free(void *zmem, void *data) |
37 | 0 | { |
38 | 0 | gs_memory_t *mem = zmem; |
39 | |
|
40 | | gs_free_object(mem, data, "s_brotli_free"); |
41 | 0 | } |
42 | | #endif |