File: sbrotlix.h

package info (click to toggle)
ghostscript 10.06.0~dfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 96,296 kB
  • sloc: ansic: 944,438; python: 7,917; cpp: 6,534; cs: 6,457; sh: 6,168; java: 4,028; perl: 2,373; tcl: 1,639; makefile: 538; awk: 66; yacc: 18
file content (53 lines) | stat: -rw-r--r-- 1,516 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* Copyright (C) 2025 Artifex Software, Inc.
   All Rights Reserved.

   This software is provided AS-IS with no warranty, either express or
   implied.

   This software is distributed under license and may not be copied,
   modified or distributed except as expressly authorized under the terms
   of the license contained in the file LICENSE in this distribution.

   Refer to licensing information at http://www.artifex.com or contact
   Artifex Software, Inc.,  39 Mesa Street, Suite 108A, San Francisco,
   CA 94129, USA, for further information.
*/


/* Implementation definitions for brotli interface */
/* Must be compiled with -I$(BROTLIDIR) */

#ifndef sbrotlixx_INCLUDED
#  define sbrotlixx_INCLUDED

#include "scommon.h"

/* These have to be open for the postscript filters
 * to be able to set params. */
typedef struct stream_brotlid_state_s {
    stream_state_common;
    void *dec_state;
} stream_brotlid_state;

typedef struct stream_brotlie_state_s {
    stream_state_common;
    void *enc_state;
    int mode;
    int windowBits;
    int level;
} stream_brotlie_state;

extern const stream_template s_brotliD_template;
extern const stream_template s_brotliE_template;

/* Shared procedures */
stream_proc_set_defaults(s_brotliE_set_defaults);

/*
 * Provide brotli-compatible allocation and freeing functions.
 * The mem pointer actually points to the dynamic state.
 */
void *s_brotli_alloc(void *mem, size_t size);
void s_brotli_free(void *mem, void *address);

#endif /* sbrotlixx_INCLUDED */