/src/ghostpdl/base/sbrotlic.c
Line | Count | Source (jump to first uncovered line) |
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 | | /* Provide brotli-compatible allocation and freeing functions. */ |
27 | | void * |
28 | | s_brotli_alloc(void *zmem, size_t size) |
29 | 0 | { |
30 | 0 | gs_memory_t *mem = zmem; |
31 | 0 | return gs_alloc_bytes(mem, size, "s_brotli_alloc"); |
32 | 0 | } |
33 | | |
34 | | void |
35 | | s_brotli_free(void *zmem, void *data) |
36 | 0 | { |
37 | 0 | gs_memory_t *mem = zmem; |
38 | |
|
39 | 0 | gs_free_object(mem, data, "s_brotli_free"); |
40 | 0 | } |