comparison mupdf-source/thirdparty/brotli/c/enc/literal_cost.h @ 2:b50eed0cc0ef upstream

ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4. The directory name has changed: no version number in the expanded directory now.
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 15 Sep 2025 11:43:07 +0200
parents
children
comparison
equal deleted inserted replaced
1:1d09e1dec1d9 2:b50eed0cc0ef
1 /* Copyright 2013 Google Inc. All Rights Reserved.
2
3 Distributed under MIT license.
4 See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
5 */
6
7 /* Literal cost model to allow backward reference replacement to be efficient.
8 */
9
10 #ifndef BROTLI_ENC_LITERAL_COST_H_
11 #define BROTLI_ENC_LITERAL_COST_H_
12
13 #include <brotli/types.h>
14
15 #include "../common/platform.h"
16
17 #if defined(__cplusplus) || defined(c_plusplus)
18 extern "C" {
19 #endif
20
21 /* Estimates how many bits the literals in the interval [pos, pos + len) in the
22 ring-buffer (data, mask) will take entropy coded and writes these estimates
23 to the cost[0..len) array. */
24 BROTLI_INTERNAL void BrotliEstimateBitCostsForLiterals(
25 size_t pos, size_t len, size_t mask, const uint8_t* data, size_t* histogram,
26 float* cost);
27
28 #if defined(__cplusplus) || defined(c_plusplus)
29 } /* extern "C" */
30 #endif
31
32 #endif /* BROTLI_ENC_LITERAL_COST_H_ */