]>
git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/C/BrotliCompress/enc/literal_cost.h
1 /* Copyright 2013 Google Inc. All Rights Reserved.
3 Distributed under MIT license.
4 See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
7 /* Literal cost model to allow backward reference replacement to be efficient.
10 #ifndef BROTLI_ENC_LITERAL_COST_H_
11 #define BROTLI_ENC_LITERAL_COST_H_
13 #include "../common/types.h"
16 #if defined(__cplusplus) || defined(c_plusplus)
20 /* Estimates how many bits the literals in the interval [pos, pos + len) in the
21 ringbuffer (data, mask) will take entropy coded and writes these estimates
22 to the cost[0..len) array. */
23 BROTLI_INTERNAL
void BrotliEstimateBitCostsForLiterals(
24 size_t pos
, size_t len
, size_t mask
, const uint8_t *data
, float *cost
);
26 #if defined(__cplusplus) || defined(c_plusplus)
30 #endif /* BROTLI_ENC_LITERAL_COST_H_ */