2019-03-07 01:55:38 +03:00
|
|
|
package brotli
|
|
|
|
|
|
|
|
/* 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. */
|
2019-03-16 03:24:40 +03:00
|
|
|
type hasherParams struct {
|
2019-03-07 01:55:38 +03:00
|
|
|
type_ int
|
|
|
|
bucket_bits int
|
|
|
|
block_bits int
|
|
|
|
hash_len int
|
|
|
|
num_last_distances_to_check int
|
|
|
|
}
|
|
|
|
|
2019-03-16 03:24:40 +03:00
|
|
|
type distanceParams struct {
|
2019-03-07 01:55:38 +03:00
|
|
|
distance_postfix_bits uint32
|
|
|
|
num_direct_distance_codes uint32
|
|
|
|
alphabet_size uint32
|
|
|
|
max_distance uint
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Encoding parameters */
|
2019-03-16 03:24:40 +03:00
|
|
|
type encoderParams struct {
|
2019-03-07 01:55:38 +03:00
|
|
|
mode int
|
|
|
|
quality int
|
|
|
|
lgwin uint
|
|
|
|
lgblock int
|
|
|
|
size_hint uint
|
|
|
|
disable_literal_context_modeling bool
|
|
|
|
large_window bool
|
2019-03-16 03:24:40 +03:00
|
|
|
hasher hasherParams
|
|
|
|
dist distanceParams
|
|
|
|
dictionary encoderDictionary
|
2019-03-07 01:55:38 +03:00
|
|
|
}
|