diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:15 +0300 |
commit | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch) | |
tree | da2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /contrib/libs/brotli/enc/metablock.h | |
parent | 778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff) | |
download | ydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/brotli/enc/metablock.h')
-rw-r--r-- | contrib/libs/brotli/enc/metablock.h | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/contrib/libs/brotli/enc/metablock.h b/contrib/libs/brotli/enc/metablock.h index 334a79a443..add40a056c 100644 --- a/contrib/libs/brotli/enc/metablock.h +++ b/contrib/libs/brotli/enc/metablock.h @@ -1,5 +1,5 @@ /* Copyright 2015 Google Inc. All Rights Reserved. - + Distributed under MIT license. See file LICENSE for detail or copy at https://opensource.org/licenses/MIT */ @@ -7,26 +7,26 @@ /* Algorithms for distributing the literals and commands of a metablock between block types and contexts. */ -#ifndef BROTLI_ENC_METABLOCK_H_ -#define BROTLI_ENC_METABLOCK_H_ - +#ifndef BROTLI_ENC_METABLOCK_H_ +#define BROTLI_ENC_METABLOCK_H_ + #include "../common/context.h" #include "../common/platform.h" #include <brotli/types.h> #include "./block_splitter.h" -#include "./command.h" -#include "./histogram.h" +#include "./command.h" +#include "./histogram.h" #include "./memory.h" #include "./quality.h" - + #if defined(__cplusplus) || defined(c_plusplus) extern "C" { #endif - + typedef struct MetaBlockSplit { - BlockSplit literal_split; - BlockSplit command_split; - BlockSplit distance_split; + BlockSplit literal_split; + BlockSplit command_split; + BlockSplit distance_split; uint32_t* literal_context_map; size_t literal_context_map_size; uint32_t* distance_context_map; @@ -38,7 +38,7 @@ typedef struct MetaBlockSplit { HistogramDistance* distance_histograms; size_t distance_histograms_size; } MetaBlockSplit; - + static BROTLI_INLINE void InitMetaBlockSplit(MetaBlockSplit* mb) { BrotliInitBlockSplit(&mb->literal_split); BrotliInitBlockSplit(&mb->command_split); @@ -54,7 +54,7 @@ static BROTLI_INLINE void InitMetaBlockSplit(MetaBlockSplit* mb) { mb->distance_histograms = 0; mb->distance_histograms_size = 0; } - + static BROTLI_INLINE void DestroyMetaBlockSplit( MemoryManager* m, MetaBlockSplit* mb) { BrotliDestroyBlockSplit(m, &mb->literal_split); @@ -66,7 +66,7 @@ static BROTLI_INLINE void DestroyMetaBlockSplit( BROTLI_FREE(m, mb->command_histograms); BROTLI_FREE(m, mb->distance_histograms); } - + /* Uses the slow shortest-path block splitter and does context clustering. The distance parameters are dynamically selected based on the commands which get recomputed under the new distance parameters. The new distance @@ -82,7 +82,7 @@ BROTLI_INTERNAL void BrotliBuildMetaBlock(MemoryManager* m, size_t num_commands, ContextType literal_context_mode, MetaBlockSplit* mb); - + /* Uses a fast greedy block splitter that tries to merge current block with the last or the second last block and uses a static context clustering which is the same for all block types. */ @@ -91,10 +91,10 @@ BROTLI_INTERNAL void BrotliBuildMetaBlockGreedy( uint8_t prev_byte, uint8_t prev_byte2, ContextLut literal_context_lut, size_t num_contexts, const uint32_t* static_context_map, const Command* commands, size_t n_commands, MetaBlockSplit* mb); - + BROTLI_INTERNAL void BrotliOptimizeHistograms(uint32_t num_distance_codes, MetaBlockSplit* mb); - + BROTLI_INTERNAL void BrotliInitDistanceParams(BrotliEncoderParams* params, uint32_t npostfix, uint32_t ndirect); |