2017-12-12 13:33:12 +00:00
|
|
|
/* Copyright 2017 Google Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
Distributed under MIT license.
|
|
|
|
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Parameters for the Brotli encoder with chosen quality levels. */
|
|
|
|
|
|
|
|
#ifndef BROTLI_ENC_PARAMS_H_
|
|
|
|
#define BROTLI_ENC_PARAMS_H_
|
|
|
|
|
|
|
|
#include <brotli/encode.h>
|
2022-11-17 13:03:09 +00:00
|
|
|
|
2021-09-08 07:18:45 +00:00
|
|
|
#include "encoder_dict.h"
|
2017-12-12 13:33:12 +00:00
|
|
|
|
|
|
|
typedef struct BrotliHasherParams {
|
|
|
|
int type;
|
|
|
|
int bucket_bits;
|
|
|
|
int block_bits;
|
|
|
|
int num_last_distances_to_check;
|
|
|
|
} BrotliHasherParams;
|
|
|
|
|
2018-02-26 14:04:36 +00:00
|
|
|
typedef struct BrotliDistanceParams {
|
|
|
|
uint32_t distance_postfix_bits;
|
2018-03-20 11:37:41 +00:00
|
|
|
uint32_t num_direct_distance_codes;
|
2019-04-12 11:57:42 +00:00
|
|
|
uint32_t alphabet_size_max;
|
|
|
|
uint32_t alphabet_size_limit;
|
2018-02-26 14:04:36 +00:00
|
|
|
size_t max_distance;
|
|
|
|
} BrotliDistanceParams;
|
|
|
|
|
2017-12-12 13:33:12 +00:00
|
|
|
/* Encoding parameters */
|
|
|
|
typedef struct BrotliEncoderParams {
|
|
|
|
BrotliEncoderMode mode;
|
|
|
|
int quality;
|
|
|
|
int lgwin;
|
|
|
|
int lgblock;
|
2019-04-12 11:57:42 +00:00
|
|
|
size_t stream_offset;
|
2017-12-12 13:33:12 +00:00
|
|
|
size_t size_hint;
|
|
|
|
BROTLI_BOOL disable_literal_context_modeling;
|
2018-02-26 14:04:36 +00:00
|
|
|
BROTLI_BOOL large_window;
|
2017-12-12 13:33:12 +00:00
|
|
|
BrotliHasherParams hasher;
|
2018-02-26 14:04:36 +00:00
|
|
|
BrotliDistanceParams dist;
|
2021-11-10 09:34:39 +00:00
|
|
|
/* TODO(eustas): rename to BrotliShared... */
|
2021-08-04 12:42:02 +00:00
|
|
|
SharedEncoderDictionary dictionary;
|
2017-12-12 13:33:12 +00:00
|
|
|
} BrotliEncoderParams;
|
|
|
|
|
|
|
|
#endif /* BROTLI_ENC_PARAMS_H_ */
|