wxMaxima
Loading...
Searching...
No Matches
shared_dictionary.h
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)
16extern "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
31
35typedef enum BrotliSharedDictionaryType {
37 BROTLI_SHARED_DICTIONARY_RAW = 0,
42 BROTLI_SHARED_DICTIONARY_SERIALIZED = 1
43} BrotliSharedDictionaryType;
44
62BROTLI_COMMON_API BrotliSharedDictionary* BrotliSharedDictionaryCreateInstance(
63 brotli_alloc_func alloc_func, brotli_free_func free_func, void* opaque);
64
70BROTLI_COMMON_API void BrotliSharedDictionaryDestroyInstance(
72
92BROTLI_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_ */
Definition: shared_dictionary_internal.h:22
Common types used in decoder and encoder API.
void *(* brotli_alloc_func)(void *opaque, size_t size)
Allocating function pointer type.
Definition: types.h:71
void(* brotli_free_func)(void *opaque, void *address)
Deallocating function pointer type.
Definition: types.h:81
#define BROTLI_BOOL
A portable bool replacement.
Definition: types.h:49