+++ /dev/null
-/* NOLINT(build/header_guard) */\r
-/* Copyright 2014 Google Inc. All Rights Reserved.\r
-\r
- Distributed under MIT license.\r
- See file LICENSE for detail or copy at https://opensource.org/licenses/MIT\r
-*/\r
-\r
-/* template parameters: FN */\r
-\r
-#define HistogramType FN(Histogram)\r
-\r
-/* Creates entropy codes for all block types and stores them to the bit\r
- stream. */\r
-static void FN(BuildAndStoreEntropyCodes)(MemoryManager* m, BlockEncoder* self,\r
- const HistogramType* histograms, const size_t histograms_size,\r
- const size_t alphabet_size, HuffmanTree* tree,\r
- size_t* storage_ix, uint8_t* storage) {\r
- const size_t table_size = histograms_size * self->histogram_length_;\r
- self->depths_ = BROTLI_ALLOC(m, uint8_t, table_size);\r
- self->bits_ = BROTLI_ALLOC(m, uint16_t, table_size);\r
- if (BROTLI_IS_OOM(m)) return;\r
-\r
- {\r
- size_t i;\r
- for (i = 0; i < histograms_size; ++i) {\r
- size_t ix = i * self->histogram_length_;\r
- BuildAndStoreHuffmanTree(&histograms[i].data_[0], self->histogram_length_,\r
- alphabet_size, tree, &self->depths_[ix], &self->bits_[ix],\r
- storage_ix, storage);\r
- }\r
- }\r
-}\r
-\r
-#undef HistogramType\r