mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
use BROTLI_COLD in enc
PiperOrigin-RevId: 800516878
This commit is contained in:
committed by
Copybara-Service
parent
cb29dec4ed
commit
25190700e2
@@ -21,7 +21,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#if (BROTLI_STATIC_INIT != BROTLI_STATIC_INIT_NONE)
|
||||
BROTLI_BOOL BrotliEncoderInitDictionaryHash(
|
||||
BROTLI_BOOL BROTLI_COLD BrotliEncoderInitDictionaryHash(
|
||||
const BrotliDictionary* dict, uint16_t* words, uint8_t* lengths) {
|
||||
size_t global_idx = 0;
|
||||
size_t len;
|
||||
|
||||
@@ -1774,7 +1774,7 @@ BrotliEncoderPreparedDictionary* BrotliEncoderPrepareDictionary(
|
||||
return (BrotliEncoderPreparedDictionary*)managed_dictionary;
|
||||
}
|
||||
|
||||
void BrotliEncoderDestroyPreparedDictionary(
|
||||
void BROTLI_COLD BrotliEncoderDestroyPreparedDictionary(
|
||||
BrotliEncoderPreparedDictionary* dictionary) {
|
||||
ManagedDictionary* dict = (ManagedDictionary*)dictionary;
|
||||
if (!dictionary) return;
|
||||
@@ -1800,7 +1800,8 @@ void BrotliEncoderDestroyPreparedDictionary(
|
||||
BrotliDestroyManagedDictionary(dict);
|
||||
}
|
||||
|
||||
BROTLI_BOOL BrotliEncoderAttachPreparedDictionary(BrotliEncoderState* state,
|
||||
BROTLI_BOOL BROTLI_COLD BrotliEncoderAttachPreparedDictionary(
|
||||
BrotliEncoderState* state,
|
||||
const BrotliEncoderPreparedDictionary* dictionary) {
|
||||
/* First field of dictionary structs */
|
||||
const BrotliEncoderPreparedDictionary* dict = dictionary;
|
||||
@@ -1857,8 +1858,8 @@ BROTLI_BOOL BrotliEncoderAttachPreparedDictionary(BrotliEncoderState* state,
|
||||
return BROTLI_TRUE;
|
||||
}
|
||||
|
||||
size_t BrotliEncoderEstimatePeakMemoryUsage(int quality, int lgwin,
|
||||
size_t input_size) {
|
||||
size_t BROTLI_COLD BrotliEncoderEstimatePeakMemoryUsage(int quality, int lgwin,
|
||||
size_t input_size) {
|
||||
BrotliEncoderParams params;
|
||||
size_t memory_manager_slots = BROTLI_ENCODER_MEMORY_MANAGER_SLOTS;
|
||||
size_t memory_manager_size = memory_manager_slots * sizeof(void*);
|
||||
@@ -1925,7 +1926,7 @@ size_t BrotliEncoderEstimatePeakMemoryUsage(int quality, int lgwin,
|
||||
histogram_size);
|
||||
}
|
||||
}
|
||||
size_t BrotliEncoderGetPreparedDictionarySize(
|
||||
size_t BROTLI_COLD BrotliEncoderGetPreparedDictionarySize(
|
||||
const BrotliEncoderPreparedDictionary* prepared_dictionary) {
|
||||
/* First field of dictionary structs */
|
||||
const BrotliEncoderPreparedDictionary* prepared = prepared_dictionary;
|
||||
|
||||
@@ -24,7 +24,7 @@ extern "C" {
|
||||
#if (BROTLI_STATIC_INIT != BROTLI_STATIC_INIT_NONE)
|
||||
|
||||
/* TODO(eustas): deal with largest bucket(s). Not it contains 163 items. */
|
||||
static BROTLI_BOOL DoBrotliEncoderInitStaticDictionaryLut(
|
||||
static BROTLI_BOOL BROTLI_COLD DoBrotliEncoderInitStaticDictionaryLut(
|
||||
const BrotliDictionary* dict, uint16_t* buckets, DictWord* words,
|
||||
void* arena) {
|
||||
DictWord* slots = (DictWord*)arena;
|
||||
|
||||
Reference in New Issue
Block a user