xref: /aosp_15_r20/external/brotli/c/enc/params.h (revision f4ee7fba7774faf2a30f13154332c0a06550dbc4)
1*f4ee7fbaSAndroid Build Coastguard Worker /* Copyright 2017 Google Inc. All Rights Reserved.
2*f4ee7fbaSAndroid Build Coastguard Worker 
3*f4ee7fbaSAndroid Build Coastguard Worker    Distributed under MIT license.
4*f4ee7fbaSAndroid Build Coastguard Worker    See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
5*f4ee7fbaSAndroid Build Coastguard Worker */
6*f4ee7fbaSAndroid Build Coastguard Worker 
7*f4ee7fbaSAndroid Build Coastguard Worker /* Parameters for the Brotli encoder with chosen quality levels. */
8*f4ee7fbaSAndroid Build Coastguard Worker 
9*f4ee7fbaSAndroid Build Coastguard Worker #ifndef BROTLI_ENC_PARAMS_H_
10*f4ee7fbaSAndroid Build Coastguard Worker #define BROTLI_ENC_PARAMS_H_
11*f4ee7fbaSAndroid Build Coastguard Worker 
12*f4ee7fbaSAndroid Build Coastguard Worker #include <brotli/encode.h>
13*f4ee7fbaSAndroid Build Coastguard Worker #include "./encoder_dict.h"
14*f4ee7fbaSAndroid Build Coastguard Worker 
15*f4ee7fbaSAndroid Build Coastguard Worker typedef struct BrotliHasherParams {
16*f4ee7fbaSAndroid Build Coastguard Worker   int type;
17*f4ee7fbaSAndroid Build Coastguard Worker   int bucket_bits;
18*f4ee7fbaSAndroid Build Coastguard Worker   int block_bits;
19*f4ee7fbaSAndroid Build Coastguard Worker   int hash_len;
20*f4ee7fbaSAndroid Build Coastguard Worker   int num_last_distances_to_check;
21*f4ee7fbaSAndroid Build Coastguard Worker } BrotliHasherParams;
22*f4ee7fbaSAndroid Build Coastguard Worker 
23*f4ee7fbaSAndroid Build Coastguard Worker typedef struct BrotliDistanceParams {
24*f4ee7fbaSAndroid Build Coastguard Worker   uint32_t distance_postfix_bits;
25*f4ee7fbaSAndroid Build Coastguard Worker   uint32_t num_direct_distance_codes;
26*f4ee7fbaSAndroid Build Coastguard Worker   uint32_t alphabet_size_max;
27*f4ee7fbaSAndroid Build Coastguard Worker   uint32_t alphabet_size_limit;
28*f4ee7fbaSAndroid Build Coastguard Worker   size_t max_distance;
29*f4ee7fbaSAndroid Build Coastguard Worker } BrotliDistanceParams;
30*f4ee7fbaSAndroid Build Coastguard Worker 
31*f4ee7fbaSAndroid Build Coastguard Worker /* Encoding parameters */
32*f4ee7fbaSAndroid Build Coastguard Worker typedef struct BrotliEncoderParams {
33*f4ee7fbaSAndroid Build Coastguard Worker   BrotliEncoderMode mode;
34*f4ee7fbaSAndroid Build Coastguard Worker   int quality;
35*f4ee7fbaSAndroid Build Coastguard Worker   int lgwin;
36*f4ee7fbaSAndroid Build Coastguard Worker   int lgblock;
37*f4ee7fbaSAndroid Build Coastguard Worker   size_t stream_offset;
38*f4ee7fbaSAndroid Build Coastguard Worker   size_t size_hint;
39*f4ee7fbaSAndroid Build Coastguard Worker   BROTLI_BOOL disable_literal_context_modeling;
40*f4ee7fbaSAndroid Build Coastguard Worker   BROTLI_BOOL large_window;
41*f4ee7fbaSAndroid Build Coastguard Worker   BrotliHasherParams hasher;
42*f4ee7fbaSAndroid Build Coastguard Worker   BrotliDistanceParams dist;
43*f4ee7fbaSAndroid Build Coastguard Worker   BrotliEncoderDictionary dictionary;
44*f4ee7fbaSAndroid Build Coastguard Worker } BrotliEncoderParams;
45*f4ee7fbaSAndroid Build Coastguard Worker 
46*f4ee7fbaSAndroid Build Coastguard Worker #endif  /* BROTLI_ENC_PARAMS_H_ */
47