Rizin
unix-like reverse engineering framework and cli tools
|
#include "lz4hc.h"
Go to the source code of this file.
Classes | |
struct | LZ4HC_optimal_t |
struct | LZ4HC_match_t |
Macros | |
#define | LZ4HC_HEAPMODE 1 |
#define | LZ4_HC_STATIC_LINKING_ONLY |
#define | LZ4_COMMONDEFS_ONLY |
#define | OPTIMAL_ML (int)((ML_MASK-1)+MINMATCH) |
#define | LZ4_OPT_NUM (1<<12) |
#define | MIN(a, b) ( (a) < (b) ? (a) : (b) ) |
#define | MAX(a, b) ( (a) > (b) ? (a) : (b) ) |
#define | HASH_FUNCTION(i) (((i) * 2654435761U) >> ((MINMATCH*8)-LZ4HC_HASH_LOG)) |
#define | DELTANEXTMAXD(p) chainTable[(p) & LZ4HC_MAXD_MASK] /* flexible, LZ4HC_MAXD dependent */ |
#define | DELTANEXTU16(table, pos) table[(U16)(pos)] /* faster */ |
#define | UPDATABLE(ip, op, anchor) &ip, &op, &anchor |
#define | LZ4HC_rotl32(x, r) ((x << r) | (x >> (32 - r))) |
#define | ip (*_ip) |
#define | op (*_op) |
#define | anchor (*_anchor) |
#define | TRAILING_LITERALS 3 |
Enumerations | |
enum | dictCtx_directive { noDictCtx , usingDictCtxHc } |
enum | repeat_state_e { rep_untested , rep_not , rep_confirmed } |
enum | HCfavor_e { favorCompressionRatio =0 , favorDecompressionSpeed } |
#define anchor (*_anchor) |
#define DELTANEXTMAXD | ( | p | ) | chainTable[(p) & LZ4HC_MAXD_MASK] /* flexible, LZ4HC_MAXD dependent */ |
#define HASH_FUNCTION | ( | i | ) | (((i) * 2654435761U) >> ((MINMATCH*8)-LZ4HC_HASH_LOG)) |
#define ip (*_ip) |
#define LZ4HC_HEAPMODE 1 |
#define op (*_op) |
#define TRAILING_LITERALS 3 |
enum dictCtx_directive |
enum HCfavor_e |
enum repeat_state_e |
void LZ4_attach_HC_dictionary | ( | LZ4_streamHC_t * | working_stream, |
const LZ4_streamHC_t * | dictionary_stream | ||
) |
Definition at line 1077 of file lz4hc.c.
References LZ4HC_CCtx_internal::dictCtx, LZ4_streamHC_u::internal_donotuse, and NULL.
Referenced by FUZ_test(), LZ4_compressResetStreamHC(), LZ4F_initStream(), and state_attachDictHCRoundTrip().
int LZ4_compress_HC | ( | const char * | src, |
char * | dst, | ||
int | srcSize, | ||
int | dstCapacity, | ||
int | compressionLevel | ||
) |
LZ4_compress_HC() : Compress data from src
into dst
, using the powerful but slower "HC" algorithm. dst
must be already allocated. Compression is guaranteed to succeed if dstCapacity >= LZ4_compressBound(srcSize)
(see "lz4.h") Max supported srcSize
value is LZ4_MAX_INPUT_SIZE (see "lz4.h") compressionLevel
: any value between 1 and LZ4HC_CLEVEL_MAX will work. Values > LZ4HC_CLEVEL_MAX behave the same as LZ4HC_CLEVEL_MAX.
Definition at line 954 of file lz4hc.c.
References ALLOC, compressionLevel, dst, FREEMEM, LZ4_compress_HC_extStateHC(), src, and srcSize.
Referenced by FUZ_test(), LLVMFuzzerTestOneInput(), local_LZ4_compress_HC(), LZ4_compressBlockNoStreamHC(), LZ4_compressHC(), LZ4_compressHC2(), LZ4_compressHC2_limitedOutput(), LZ4_compressHC_limitedOutput(), LZ4IO_compressFilename_Legacy(), and roundTripTest().
int LZ4_compress_HC_continue | ( | LZ4_streamHC_t * | LZ4_streamHCPtr, |
const char * | src, | ||
char * | dst, | ||
int | srcSize, | ||
int | dstCapacity | ||
) |
Definition at line 1138 of file lz4hc.c.
References dst, limitedOutput, LZ4_compressBound(), LZ4_compressHC_continue_generic(), notLimited, src, and srcSize.
Referenced by FUZ_test(), FUZ_unitTests(), local_LZ4_compress_HC_continue(), LZ4_compressBlockStreamHC(), LZ4_compressHC_continue(), LZ4_compressHC_limitedOutput_continue(), LZ4F_compressBlockHC(), LZ4F_compressBlockHC_continue(), state_extDictHCRoundTrip(), state_prefixHCRoundTrip(), and test_compress().
int LZ4_compress_HC_continue_destSize | ( | LZ4_streamHC_t * | LZ4_streamHCPtr, |
const char * | src, | ||
char * | dst, | ||
int * | srcSizePtr, | ||
int | targetDstSize | ||
) |
LZ4_compress_HC_continue_destSize() : v1.9.0+ Similar to LZ4_compress_HC_continue(), but will read as much data as possible from src
to fit into targetDstSize
budget. Result is provided into 2 parts :
srcSizePtr
: on success, *srcSizePtr will be updated to indicate how much bytes were read from src
. Note that this function may not consume the entire input. Definition at line 1146 of file lz4hc.c.
References dst, fillOutput, LZ4_compressHC_continue_generic(), and src.
Referenced by FUZ_test().
int LZ4_compress_HC_destSize | ( | void * | stateHC, |
const char * | src, | ||
char * | dst, | ||
int * | srcSizePtr, | ||
int | targetDstSize, | ||
int | compressionLevel | ||
) |
LZ4_compress_HC_destSize() : v1.9.0+ Will compress as much data as possible from src
to fit into targetDstSize
budget. Result is provided in 2 parts :
srcSizePtr
: on success, *srcSizePtr is updated to indicate how much bytes were read from src
Definition at line 970 of file lz4hc.c.
References dest, fillOutput, LZ4_initStreamHC(), LZ4_setCompressionLevel(), LZ4HC_compress_generic(), LZ4HC_init_internal(), NULL, and source.
Referenced by FUZ_test(), FUZ_unitTests(), and LLVMFuzzerTestOneInput().
int LZ4_compress_HC_extStateHC | ( | void * | state, |
const char * | src, | ||
char * | dst, | ||
int | srcSize, | ||
int | dstCapacity, | ||
int | compressionLevel | ||
) |
Definition at line 947 of file lz4hc.c.
References compressionLevel, dst, LZ4_compress_HC_extStateHC_fastReset(), LZ4_initStreamHC(), NULL, src, and srcSize.
Referenced by FUZ_test(), local_LZ4_compress_HC_extStateHC(), LZ4_compress_HC(), LZ4_compressHC2_limitedOutput_withStateHC(), LZ4_compressHC2_withStateHC(), LZ4_compressHC_limitedOutput_withStateHC(), and LZ4_compressHC_withStateHC().
int LZ4_compress_HC_extStateHC_fastReset | ( | void * | state, |
const char * | src, | ||
char * | dst, | ||
int | srcSize, | ||
int | dstCapacity, | ||
int | compressionLevel | ||
) |
Definition at line 935 of file lz4hc.c.
References compressionLevel, dst, limitedOutput, LZ4_compressBound(), LZ4_isAligned(), LZ4_resetStreamHC_fast(), LZ4_streamHC_t_alignment(), LZ4HC_compress_generic(), LZ4HC_init_internal(), notLimited, src, and srcSize.
Referenced by FUZ_test(), LZ4_compress_HC_extStateHC(), and LZ4F_compressBlockHC().
Definition at line 1189 of file lz4hc.c.
References dst, LZ4_compress_HC(), LZ4_compressBound(), src, and srcSize.
Definition at line 1191 of file lz4hc.c.
References dst, LZ4_compress_HC(), LZ4_compressBound(), src, and srcSize.
int LZ4_compressHC2_continue | ( | void * | LZ4HC_Data, |
const char * | src, | ||
char * | dst, | ||
int | srcSize, | ||
int | cLevel | ||
) |
Definition at line 1229 of file lz4hc.c.
References dst, LZ4HC_compress_generic(), notLimited, src, and srcSize.
int LZ4_compressHC2_limitedOutput | ( | const char * | src, |
char * | dst, | ||
int | srcSize, | ||
int | maxDstSize, | ||
int | cLevel | ||
) |
Definition at line 1192 of file lz4hc.c.
References dst, LZ4_compress_HC(), maxDstSize, src, and srcSize.
int LZ4_compressHC2_limitedOutput_continue | ( | void * | LZ4HC_Data, |
const char * | src, | ||
char * | dst, | ||
int | srcSize, | ||
int | dstCapacity, | ||
int | cLevel | ||
) |
Definition at line 1234 of file lz4hc.c.
References dst, limitedOutput, LZ4HC_compress_generic(), src, and srcSize.
int LZ4_compressHC2_limitedOutput_withStateHC | ( | void * | state, |
const char * | src, | ||
char * | dst, | ||
int | srcSize, | ||
int | maxDstSize, | ||
int | cLevel | ||
) |
Definition at line 1196 of file lz4hc.c.
References dst, LZ4_compress_HC_extStateHC(), maxDstSize, src, and srcSize.
int LZ4_compressHC2_withStateHC | ( | void * | state, |
const char * | src, | ||
char * | dst, | ||
int | srcSize, | ||
int | cLevel | ||
) |
Definition at line 1195 of file lz4hc.c.
References dst, LZ4_compress_HC_extStateHC(), LZ4_compressBound(), src, and srcSize.
int LZ4_compressHC_continue | ( | LZ4_streamHC_t * | ctx, |
const char * | src, | ||
char * | dst, | ||
int | srcSize | ||
) |
Definition at line 1197 of file lz4hc.c.
References dst, LZ4_compress_HC_continue(), LZ4_compressBound(), src, and srcSize.
|
static |
Definition at line 1102 of file lz4hc.c.
References assert(), LZ4HC_CCtx_internal::base, LZ4HC_CCtx_internal::compressionLevel, DEBUGLOG, LZ4HC_CCtx_internal::dictBase, LZ4HC_CCtx_internal::dictLimit, dst, LZ4HC_CCtx_internal::end, GB, LZ4_streamHC_u::internal_donotuse, KB, limit, LZ4HC_CCtx_internal::lowLimit, LZ4_loadDictHC(), LZ4HC_compress_generic(), LZ4HC_init_internal(), LZ4HC_setExternalDict(), NULL, src, and U32.
Referenced by LZ4_compress_HC_continue(), and LZ4_compress_HC_continue_destSize().
Definition at line 1190 of file lz4hc.c.
References dst, LZ4_compress_HC(), maxDstSize, src, and srcSize.
int LZ4_compressHC_limitedOutput_continue | ( | LZ4_streamHC_t * | ctx, |
const char * | src, | ||
char * | dst, | ||
int | srcSize, | ||
int | maxDstSize | ||
) |
Definition at line 1198 of file lz4hc.c.
References dst, LZ4_compress_HC_continue(), maxDstSize, src, and srcSize.
int LZ4_compressHC_limitedOutput_withStateHC | ( | void * | state, |
const char * | src, | ||
char * | dst, | ||
int | srcSize, | ||
int | maxDstSize | ||
) |
Definition at line 1194 of file lz4hc.c.
References dst, LZ4_compress_HC_extStateHC(), maxDstSize, src, and srcSize.
Definition at line 1193 of file lz4hc.c.
References dst, LZ4_compress_HC_extStateHC(), LZ4_compressBound(), src, and srcSize.
void* LZ4_createHC | ( | const char * | inputBuffer | ) |
Definition at line 1214 of file lz4hc.c.
References inputBuffer, LZ4_streamHC_u::internal_donotuse, LZ4_createStreamHC(), LZ4HC_init_internal(), and NULL.
Referenced by FUZ_test().
LZ4_streamHC_t* LZ4_createStreamHC | ( | void | ) |
LZ4_createStreamHC() and LZ4_freeStreamHC() : These functions create and release memory for LZ4 HC streaming state. Newly created states are automatically initialized. A same state can be used multiple times consecutively, starting with LZ4_resetStreamHC_fast() to start a new stream of blocks.
Definition at line 985 of file lz4hc.c.
References ALLOC_AND_ZERO, LZ4_setCompressionLevel(), LZ4HC_CLEVEL_DEFAULT, and NULL.
Referenced by FUZ_test(), FUZ_unitTests(), LZ4_compressInitStreamHC(), LZ4_createHC(), LZ4F_compressBegin_usingCDict(), LZ4F_createCDict(), state_attachDictHCRoundTrip(), and state_create().
void LZ4_favorDecompressionSpeed | ( | LZ4_streamHC_t * | LZ4_streamHCPtr, |
int | favor | ||
) |
Definition at line 1049 of file lz4hc.c.
References LZ4HC_CCtx_internal::favorDecSpeed, and LZ4_streamHC_u::internal_donotuse.
Referenced by LZ4F_compressBegin_usingCDict().
int LZ4_freeHC | ( | void * | LZ4HC_Data | ) |
int LZ4_freeStreamHC | ( | LZ4_streamHC_t * | LZ4_streamHCPtr | ) |
Definition at line 994 of file lz4hc.c.
References DEBUGLOG, and FREEMEM.
Referenced by FUZ_test(), FUZ_unitTests(), LZ4_compressCleanupStreamHC(), LZ4F_freeCDict(), state_attachDictHCRoundTrip(), and state_free().
LZ4_streamHC_t* LZ4_initStreamHC | ( | void * | buffer, |
size_t | size | ||
) |
Definition at line 1003 of file lz4hc.c.
References DEBUGLOG, LZ4_streamHC_u::internal_donotuse, LZ4_isAligned(), LZ4_setCompressionLevel(), LZ4_STATIC_ASSERT, LZ4_streamHC_t_alignment(), LZ4_STREAMHCSIZE, LZ4HC_CLEVEL_DEFAULT, MEM_INIT, and NULL.
Referenced by FUZ_unitTests(), local_LZ4_resetStreamHC(), LZ4_compress_HC_destSize(), LZ4_compress_HC_extStateHC(), LZ4_loadDictHC(), LZ4_resetStreamHC(), LZ4_resetStreamHC_fast(), LZ4_resetStreamStateHC(), and LZ4F_compressBegin_usingCDict().
int LZ4_loadDictHC | ( | LZ4_streamHC_t * | LZ4_streamHCPtr, |
const char * | dictionary, | ||
int | dictSize | ||
) |
Definition at line 1056 of file lz4hc.c.
References assert(), LZ4HC_CCtx_internal::compressionLevel, DEBUGLOG, LZ4HC_CCtx_internal::end, LZ4_streamHC_u::internal_donotuse, KB, LZ4_initStreamHC(), LZ4_setCompressionLevel(), LZ4HC_init_internal(), LZ4HC_Insert(), and NULL.
Referenced by fullSpeedBench(), FUZ_test(), FUZ_unitTests(), LZ4_compressHC_continue_generic(), LZ4_compressInitStreamHC(), LZ4F_createCDict(), state_attachDictHCRoundTrip(), and state_loadDictHCRoundTrip().
void LZ4_resetStreamHC | ( | LZ4_streamHC_t * | LZ4_streamHCPtr, |
int | compressionLevel | ||
) |
Definition at line 1021 of file lz4hc.c.
References compressionLevel, LZ4_initStreamHC(), and LZ4_setCompressionLevel().
Referenced by FUZ_unitTests().
void LZ4_resetStreamHC_fast | ( | LZ4_streamHC_t * | LZ4_streamHCPtr, |
int | compressionLevel | ||
) |
Definition at line 1027 of file lz4hc.c.
References LZ4HC_CCtx_internal::base, compressionLevel, DEBUGLOG, LZ4HC_CCtx_internal::dictCtx, LZ4HC_CCtx_internal::dirty, LZ4HC_CCtx_internal::end, LZ4_streamHC_u::internal_donotuse, LZ4_initStreamHC(), LZ4_setCompressionLevel(), and NULL.
Referenced by FUZ_test(), FUZ_unitTests(), LZ4_compress_HC_extStateHC_fastReset(), LZ4_compressResetStreamHC(), LZ4_slideInputBufferHC(), LZ4F_initStream(), and state_reset().
int LZ4_resetStreamStateHC | ( | void * | state, |
char * | inputBuffer | ||
) |
Definition at line 1206 of file lz4hc.c.
References inputBuffer, LZ4_streamHC_u::internal_donotuse, LZ4_initStreamHC(), LZ4HC_init_internal(), and NULL.
int LZ4_saveDictHC | ( | LZ4_streamHC_t * | LZ4_streamHCPtr, |
char * | safeBuffer, | ||
int | dictSize | ||
) |
Definition at line 1158 of file lz4hc.c.
References assert(), LZ4HC_CCtx_internal::base, DEBUGLOG, LZ4HC_CCtx_internal::dictLimit, LZ4HC_CCtx_internal::end, int, LZ4_streamHC_u::internal_donotuse, KB, LZ4HC_CCtx_internal::lowLimit, LZ4HC_CCtx_internal::nextToUpdate, NULL, and U32.
Referenced by FUZ_unitTests(), local_LZ4_saveDictHC(), and LZ4F_localSaveDict().
void LZ4_setCompressionLevel | ( | LZ4_streamHC_t * | LZ4_streamHCPtr, |
int | compressionLevel | ||
) |
Definition at line 1041 of file lz4hc.c.
References LZ4HC_CCtx_internal::compressionLevel, compressionLevel, DEBUGLOG, LZ4_streamHC_u::internal_donotuse, LZ4HC_CLEVEL_DEFAULT, and LZ4HC_CLEVEL_MAX.
Referenced by FUZ_test(), FUZ_unitTests(), LZ4_compress_HC_destSize(), LZ4_createStreamHC(), LZ4_initStreamHC(), LZ4_loadDictHC(), LZ4_resetStreamHC(), LZ4_resetStreamHC_fast(), LZ4F_compressBegin_usingCDict(), LZ4F_createCDict(), and state_attachDictHCRoundTrip().
int LZ4_sizeofStateHC | ( | void | ) |
LZ4_compress_HC_extStateHC() : Same as LZ4_compress_HC(), but using an externally allocated memory segment for state
. state
size is provided by LZ4_sizeofStateHC(). Memory segment must be aligned on 8-bytes boundaries (which a normal malloc() should do properly).
Definition at line 921 of file lz4hc.c.
Referenced by FUZ_test(), and LLVMFuzzerTestOneInput().
int LZ4_sizeofStreamStateHC | ( | void | ) |
char* LZ4_slideInputBufferHC | ( | void * | LZ4HC_Data | ) |
|
static |
Definition at line 923 of file lz4hc.c.
References c.
Referenced by LZ4_compress_HC_extStateHC_fastReset(), and LZ4_initStreamHC().
|
static |
Definition at line 94 of file lz4hc.c.
References LZ4HC_CCtx_internal::chainTable, LZ4HC_CCtx_internal::hashTable, and MEM_INIT.
Referenced by LZ4HC_init_internal().
|
static |
Definition at line 903 of file lz4hc.c.
References dst, limit, LZ4HC_compress_generic_dictCtx(), LZ4HC_compress_generic_noDictCtx(), NULL, and src.
Referenced by LZ4_compress_HC_destSize(), LZ4_compress_HC_extStateHC_fastReset(), LZ4_compressHC2_continue(), LZ4_compressHC2_limitedOutput_continue(), and LZ4_compressHC_continue_generic().
|
static |
Definition at line 877 of file lz4hc.c.
References assert(), dst, KB, limit, LZ4HC_compress_generic_internal(), LZ4HC_compress_generic_noDictCtx(), LZ4HC_setExternalDict(), memcpy(), NULL, src, and usingDictCtxHc.
Referenced by LZ4HC_compress_generic().
LZ4_FORCE_INLINE int LZ4HC_compress_generic_internal | ( | LZ4HC_CCtx_internal *const | ctx, |
const char *const | src, | ||
char *const | dst, | ||
int *const | srcSizePtr, | ||
int const | dstCapacity, | ||
int | cLevel, | ||
const limitedOutput_directive | limit, | ||
const dictCtx_directive | dict | ||
) |
Definition at line 796 of file lz4hc.c.
References assert(), DEBUGLOG, dst, favorCompressionRatio, favorDecompressionSpeed, fillOutput, limit, LZ4_MAX_INPUT_SIZE, LZ4_OPT_NUM, LZ4HC_CLEVEL_DEFAULT, LZ4HC_CLEVEL_MAX, LZ4HC_compress_hashChain(), LZ4HC_compress_optimal(), MIN, and src.
Referenced by LZ4HC_compress_generic_dictCtx(), and LZ4HC_compress_generic_noDictCtx().
|
static |
Definition at line 862 of file lz4hc.c.
References assert(), dst, limit, LZ4HC_compress_generic_internal(), noDictCtx, NULL, and src.
Referenced by LZ4HC_compress_generic(), and LZ4HC_compress_generic_dictCtx().
LZ4_FORCE_INLINE int LZ4HC_compress_hashChain | ( | LZ4HC_CCtx_internal *const | ctx, |
const char *const | source, | ||
char *const | dest, | ||
int * | srcSizePtr, | ||
int const | maxOutputSize, | ||
int | maxNbAttempts, | ||
const limitedOutput_directive | limit, | ||
const dictCtx_directive | dict | ||
) |
Definition at line 549 of file lz4hc.c.
References anchor, assert(), DEBUGLOG, dest, favorCompressionRatio, fillOutput, inputSize, int, INT_MAX, ip, LASTLITERALS, limit, limitedOutput, LZ4_minLength, LZ4HC_encodeSequence(), LZ4HC_InsertAndFindBestMatch(), LZ4HC_InsertAndGetWiderMatch(), maxOutputSize, memcpy(), MFLIMIT, MINMATCH, ML_BITS, ML_MASK, notLimited, NULL, op, OPTIMAL_ML, RUN_MASK, source, and UPDATABLE.
Referenced by LZ4HC_compress_generic_internal().
|
static |
Definition at line 1314 of file lz4hc.c.
References ALLOC, anchor, assert(), DEBUGLOG, dst, encode(), fillOutput, FREEMEM, int, INT_MAX, ip, LASTLITERALS, LZ4HC_match_t::len, limit, limitedOutput, LZ4HC_optimal_t::litlen, LZ4_OPT_NUM, LZ4HC_encodeSequence(), LZ4HC_FindLongerMatch(), LZ4HC_literalsPrice(), LZ4HC_sequencePrice(), memcpy(), MFLIMIT, MINMATCH, ML_BITS, ML_MASK, LZ4HC_optimal_t::mlen, notLimited, NULL, LZ4HC_optimal_t::off, LZ4HC_match_t::off, op, pos, LZ4HC_optimal_t::price, RUN_MASK, source, TRAILING_LITERALS, and UPDATABLE.
Referenced by LZ4HC_compress_generic_internal().
LZ4_FORCE_INLINE int LZ4HC_countBack | ( | const BYTE *const | ip, |
const BYTE *const | match, | ||
const BYTE *const | iMin, | ||
const BYTE *const | mMin | ||
) |
Definition at line 141 of file lz4hc.c.
References assert(), int, ip, MAX, and min.
Referenced by LZ4HC_InsertAndGetWiderMatch().
|
static |
Definition at line 172 of file lz4hc.c.
References ip, likely, LZ4_isLittleEndian(), LZ4_NbCommonBytes(), and LZ4_read_ARCH().
Referenced by LZ4HC_InsertAndGetWiderMatch().
LZ4_FORCE_INLINE int LZ4HC_encodeSequence | ( | const BYTE ** | _ip, |
BYTE ** | _op, | ||
const BYTE ** | _anchor, | ||
int | matchLength, | ||
const BYTE *const | match, | ||
limitedOutput_directive | limit, | ||
BYTE * | oend | ||
) |
Definition at line 463 of file lz4hc.c.
References anchor, assert(), DEBUGLOG, ip, LASTLITERALS, len, length, limit, LZ4_STATIC_ASSERT, LZ4_wildCopy8(), LZ4_writeLE16(), MINMATCH, ML_BITS, ML_MASK, notLimited, NULL, pos, RUN_MASK, start, and U32.
Referenced by LZ4HC_compress_hashChain(), and LZ4HC_compress_optimal().
LZ4_FORCE_INLINE LZ4HC_match_t LZ4HC_FindLongerMatch | ( | LZ4HC_CCtx_internal *const | ctx, |
const BYTE * | ip, | ||
const BYTE *const | iHighLimit, | ||
int | minLen, | ||
int | nbSearches, | ||
const dictCtx_directive | dict, | ||
const HCfavor_e | favorDecSpeed | ||
) |
Definition at line 1292 of file lz4hc.c.
References int, ip, LZ4HC_InsertAndGetWiderMatch(), match, and NULL.
Referenced by LZ4HC_compress_optimal().
Definition at line 88 of file lz4hc.c.
References HASH_FUNCTION, and LZ4_read32().
Referenced by LZ4HC_Insert(), and LZ4HC_InsertAndGetWiderMatch().
|
static |
Definition at line 100 of file lz4hc.c.
References LZ4HC_CCtx_internal::base, LZ4HC_CCtx_internal::dictBase, LZ4HC_CCtx_internal::dictLimit, LZ4HC_CCtx_internal::end, GB, KB, LZ4HC_CCtx_internal::lowLimit, LZ4HC_clearTables(), LZ4HC_CCtx_internal::nextToUpdate, start, and U32.
Referenced by LZ4_compress_HC_destSize(), LZ4_compress_HC_extStateHC_fastReset(), LZ4_compressHC_continue_generic(), LZ4_createHC(), LZ4_loadDictHC(), and LZ4_resetStreamStateHC().
LZ4_FORCE_INLINE void LZ4HC_Insert | ( | LZ4HC_CCtx_internal * | hc4, |
const BYTE * | ip | ||
) |
Definition at line 118 of file lz4hc.c.
References LZ4HC_CCtx_internal::base, LZ4HC_CCtx_internal::chainTable, delta, DELTANEXTU16, h, LZ4HC_CCtx_internal::hashTable, setup::idx, ip, LZ4HC_hashPtr(), LZ4HC_CCtx_internal::nextToUpdate, U16, and U32.
Referenced by LZ4_loadDictHC(), LZ4HC_InsertAndGetWiderMatch(), and LZ4HC_setExternalDict().
LZ4_FORCE_INLINE int LZ4HC_InsertAndFindBestMatch | ( | LZ4HC_CCtx_internal *const | hc4, |
const BYTE *const | ip, | ||
const BYTE *const | iLimit, | ||
const BYTE ** | matchpos, | ||
const int | maxNbAttempts, | ||
const int | patternAnalysis, | ||
const dictCtx_directive | dict | ||
) |
Definition at line 446 of file lz4hc.c.
References favorCompressionRatio, ip, LZ4HC_InsertAndGetWiderMatch(), and MINMATCH.
Referenced by LZ4HC_compress_hashChain().
LZ4_FORCE_INLINE int LZ4HC_InsertAndGetWiderMatch | ( | LZ4HC_CCtx_internal * | hc4, |
const BYTE *const | ip, | ||
const BYTE *const | iLowLimit, | ||
const BYTE *const | iHighLimit, | ||
int | longest, | ||
const BYTE ** | matchpos, | ||
const BYTE ** | startpos, | ||
const int | maxNbAttempts, | ||
const int | patternAnalysis, | ||
const int | chainSwap, | ||
const dictCtx_directive | dict, | ||
const HCfavor_e | favorDecSpeed | ||
) |
Definition at line 236 of file lz4hc.c.
References assert(), LZ4HC_CCtx_internal::base, LZ4HC_CCtx_internal::chainTable, DEBUGLOG, DELTANEXTU16, LZ4HC_CCtx_internal::dictBase, LZ4HC_CCtx_internal::dictCtx, LZ4HC_CCtx_internal::dictLimit, test_evm::end, LZ4HC_CCtx_internal::end, GB, LZ4HC_CCtx_internal::hashTable, int, ip, LZ4HC_CCtx_internal::lowLimit, LZ4_count(), LZ4_read16(), LZ4_read32(), LZ4HC_countBack(), LZ4HC_countPattern(), LZ4HC_hashPtr(), LZ4HC_Insert(), LZ4HC_protectDictEnd(), LZ4HC_reverseCountPattern(), LZ4HC_rotatePattern(), MAX, MIN, MINMATCH, pos, rep_confirmed, rep_not, rep_untested, repeat(), step(), U32, and usingDictCtxHc.
Referenced by LZ4HC_compress_hashChain(), LZ4HC_FindLongerMatch(), and LZ4HC_InsertAndFindBestMatch().
LZ4_FORCE_INLINE int LZ4HC_literalsPrice | ( | int const | litlen | ) |
Definition at line 1260 of file lz4hc.c.
References assert(), int, and RUN_MASK.
Referenced by LZ4HC_compress_optimal(), and LZ4HC_sequencePrice().
Definition at line 227 of file lz4hc.c.
Referenced by LZ4HC_InsertAndGetWiderMatch().
|
static |
Definition at line 206 of file lz4hc.c.
References ip, likely, and LZ4_read32().
Referenced by LZ4HC_InsertAndGetWiderMatch().
Definition at line 162 of file lz4hc.c.
References LZ4HC_rotl32, and rotate().
Referenced by LZ4HC_InsertAndGetWiderMatch().
LZ4_FORCE_INLINE int LZ4HC_sequencePrice | ( | int | litlen, |
int | mlen | ||
) |
Definition at line 1271 of file lz4hc.c.
References assert(), int, LZ4HC_literalsPrice(), MINMATCH, and ML_MASK.
Referenced by LZ4HC_compress_optimal().
|
static |
Definition at line 1083 of file lz4hc.c.
References LZ4HC_CCtx_internal::base, DEBUGLOG, LZ4HC_CCtx_internal::dictBase, LZ4HC_CCtx_internal::dictCtx, LZ4HC_CCtx_internal::dictLimit, LZ4HC_CCtx_internal::end, LZ4HC_CCtx_internal::lowLimit, LZ4HC_Insert(), LZ4HC_CCtx_internal::nextToUpdate, NULL, and U32.
Referenced by LZ4_compressHC_continue_generic(), and LZ4HC_compress_generic_dictCtx().